-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/http2: support CONNECT method #13717
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
Comments
See #13444 (comment) I think that's all you have to do. You can stay in high-level Go and not think about frames. We don't have any tests that Go's http2 server even accepts such CONNECT requests, though. It sounds like it could just work, though. |
Assigning to me to write a test for receiving and correctly mapping h2 CONNECT requests into *http.Requests. |
CL https://golang.org/cl/18266 mentions this issue. |
Support CONNECT requests in both the server & transport. See https://httpwg.github.io/specs/rfc7540.html#CONNECT When I bundle this into the main Go repo I will also add h1-vs-h2 compatibility tests there, making sure they match behavior. (I now expect that they do match) Updates golang/go#13717 Change-Id: I0c65ad47b029419027efb616fed3d8e0e2a363f4 Reviewed-on: https://go-review.googlesource.com/18266 Reviewed-by: Andrew Gerrand <adg@golang.org>
CL https://golang.org/cl/18269 mentions this issue. |
@bradfitz I see changes, but i still can not use h2 client to proceed |
With h2 you don't need to hijack. Just read and write from the provided ResponseWriter. See the first link I provided above for an example. |
Oh i see the example which use |
Hi~ @bradfitz I meet some problem like ayanamist, and want to implement a h2 proxy, too.... - -! base on http://httpwg.org/specs/rfc7540.html#CONNECT and above comment..maybe we should do something like this? (without something like
but, when we try proxy Chrome to this code using h2...it doesn't work in
After
then In http://httpwg.org/specs/rfc7231.html#CONNECT, it said
but without thank you~ |
Sorry, this bug is closed. If you have a bug report, please file a new bug with a complete repro and a description of the bug. General questions should go to https://golang.org/wiki/Questions. |
In #17227 (comment), @ayanamist thinks this bug still isn't solved. That was not my impression. Can you not use http.Transport to do a CONNECT request with a io.Pipe Request.Body and simultaneously write to it while reading from the Response.Body? |
According to h2 spec https://httpwg.github.io/specs/rfc7540.html#CONNECT
If i want to implement a h2 proxy like nghttpx in golang, i have to use low-level h2 stream to send and receive data frame while multiplexing other normal get/post requests, but i found it can not be archieved in current h2 support.
Is there a way to expose such thing?
The text was updated successfully, but these errors were encountered: