New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: Please offer function "ServeTLS" #13228
Comments
Serve already exists: We may do something more in Go 1.7, especially in light of LetsEncrypt, making that a bit easier. We'll see. |
I had to serve (with TLS) on systemd provided fds listener (socket activation). Here's a Tested to work with systemd socket listening on (If it matters, I'm using this with LetsEncrypt provided cert/key in my project, not that the function's exclusively for this purpose) |
@Gurpartap are you interested in making that a patch that's code reviewable on Gerrit since we |
CL https://golang.org/cl/38114 mentions this issue. |
@bradfitz I haven't seen any changes or comments to address your comments from March, is there some way I can help and take over this CL? This would be very helpful for my home automation project which uses systemd socket activation. If this doesn't make it into 1.9 I'll have to resort to a much uglier custom copy of this code. |
@niklas88, sure, feel free to take it over. I left new comments on https://go-review.googlesource.com/c/38114/ so be sure to incorporate those too. |
@bradfitz ok, so I have incorporated your comments and added a test. However I don't know how to mail this since it will then also contain the original change by @Gurpartap and git codereview doesn't let me mail changes with another author. I added commits on top of his change only to keep his authorship intact (by using the download copy paste from gerrit). Any idea how to best resolve this? It's my first time using gerrit... |
@niklas88, just send a change in a single commit that's a copy of his under your own git Author name. You can give @Gurpartap credit in your commit message and reference his original Gerrit URL. |
CL https://golang.org/cl/44074 mentions this issue. |
Ok thanks for that tip, I'm not sure I've done this right as I ended up with two reviews instead of a combined one as it wouldn't let me mail it with the existing Change-Id but here it is:
|
TestServeTLS was added in CL 44074, merged today. This cleans up the test a little. Updates #13228 Change-Id: I6efd798fe5fa015a34addbf60ae26919a1ed283e Reviewed-on: https://go-review.googlesource.com/45152 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
In package net/http, there's a pair of Listen* functions: ListenAndServe, ListenAndServeTLS.
It would be incredibly helpful to offer both Serve and ServeTLS as well.
The text was updated successfully, but these errors were encountered: