-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Document that the Connector can determine HTTP version #2717
Comments
Ah, I see what you mean. Even if the pool didn't have an existing HTTP/2 connection, it looks like the connector is probably using ALPN to negotiate h2 in the handshake. I was going to say something like in #2605 might help here, but only if we also had a way to tell the connector "don't ask for h2"... |
right - there's an |
@nox had some ideas of how hyper could improve this too, but I don't quite remember what they were ... |
Where is there in this case? The connector?
It's more that hyper needs to use the decision from the connector. If a protocol was negotiated via ALPN (either The version specified in the |
Yes, in the TLS connector.
That would be great! It wasn't clear to me where the decision was happening. |
Version
hyper 0.14.14
Platform
Linux pop-os 5.13.0-7614-generic #14~1631647151~20.04~930e87c-Ubuntu SMP Fri Sep 17 00:26:31 UTC x86_64 x86_64 x86_64 GNU/Linux
Description
Hyper silently upgrades HTTPS requests that set
Version::HTTP_11
to an HTTP/2 connection.I tried this code:
I expected to see this happen: Hyper sends an HTTP/1.1 request.
Instead, this happened: Hyper sends an HTTP/2 request.
You can verify this either with wireshark or by applying this diff, which will cause the above snippet to panic instead of sending the wrong version:
This matters when proxying websocket connections, which are only supported with HTTP/2 when the server supports the RFC 8441 extension.
The text was updated successfully, but these errors were encountered: