You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
mmalenic
changed the title
HttpsConnectorBuilder::enable_all_versions doesn't enable ALPN for http/1.1. HttpsConnectorBuilder::enable_all_versions doesn't enable ALPN for http/1.1
Jun 20, 2023
That seems like clearly a bug! Reading this code I forget how this was intended to work. IIRC the enable_all_versions() PR lay dormant for a pretty long while, so it's possible it got misrebased (and, appears to lack a test).
If one of you is able to submit a PR to fix (and, ideally add a test similar to the existing tests), I'd be happy to review and get a new release out!
When building a
HttpsConnectorBuilder
usingenable_all_versions
, ALPN does not seem to be enabled withhttp/1.1
, and onlyh2
is enabled:hyper-rustls/src/connector/builder.rs
Line 183 in 286e1fa
However, calling
enable_http1
followed byenable_http2
does enable ALPN for both versions.This causes the client example to fail when using a
http/1.1
server, and a client built withenable_all_versions
.For example, with mmalenic@863812f, running the following:
cargo run --example client --features http2 "https://localhost:1337" examples/sample.pem
Results in the error:
Is this the intended behaviour?
cc @norling @dbampalikis @brainstorm
The text was updated successfully, but these errors were encountered: