Repository navigation
Prefer http2 over http/1.1 in alpn when http2 is activated #1220
Unanswered
magnuswatn
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Creating a discussion, as per the issue template.
When http2 is enabled httpcore2 sends
["http/1.1", "h2"]in the alpn extension, and thus signals preference for http/1.1 over http2. This will make some servers choose http/1.1 even when http2 is supported. Since http2 is opt in, I think it makes sense to prefer http2 when it is enabled (["h2", "http/1.1"])Also, a when only http2 is enabled (
http1=False, http2=True) the alpn will still include and prefer http/1.1, so some servers will still pick http/1.1 which causes a connection failure. The alpn should only includeh2here.I can make a PR for this.
All reactions