-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: Responses should have a field for connection information #7842
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
Labels
Milestone
Comments
Same for Requests, please. We run http servers with a custom network stack, and we just hit a situation in which we'd like to be able to inspect the underlying net.Conn from an http.Handler, in order to get at security information associated with the connection. I'm happy to implement. Brad, before I start, any concerns or API commentary? The obvious thing to do is to expose the net.Conn directly in each case and document it as read-only and not to be stored, but that enables all kinds of foot-shooting. Status changed to Accepted. |
See also discussion at https://groups.google.com/forum/#!topic/Golang-nuts/cMs8b7iL5KI. |
I'd prefer to stop growing Request and Response, both for memory and API bloat reasons. Is it possible to achieve this via a new optional hook on *http.Transport instead? Some callback that happens at certain point(s) with the Request or Response and gives you the net.Conn info and then you can do what you will with the info, perhaps stuffing it in magic headers on your request or reply even...?) |
Not sure if I should close the issue. It has some important bits, but @josharian found a solution back in time which involved something other than modifying the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by [email protected]:
The text was updated successfully, but these errors were encountered: