Value of http2
not being passed on to create_ssl_context
#3126
Unanswered
mborsetti
asked this question in
Potential Issue
Replies: 1 comment 2 replies
-
Well spotted, you've found an unused appendix there... here's the deal... There's two places where we need to know if HTTP/2 is enabled or not...
This is actually a bit awkward... ideally we'd just set that in one place (the SSL context) and then have the connection pool determine the correct behavior based on that. However, there's no API for reading the ALPN context. Currently we're mutating the SSL context within the connection pool to ensure that it has the correct ALPN context. We can either...
Ideally there's also some more comprehensive documentation for us to include here. I'd suggest that we look at resolving this once #3022 has landed. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am not super-familiar with the innards of this repo, but in debugging something else I tangentially noticed from the log this entry, showing
http2=False
even though is generated when instantiating an object withhttpx.Client(http2=**True**)
:I have isolated this behavior to the two lines below, each calling
create_ssl_context
but without passinghttp2
as an argument, sohttp2
is defaulted toFalse
.httpx/httpx/_transports/default.py
Line 138 in f3eb3c9
httpx/httpx/_transports/default.py
Line 279 in f3eb3c9
I presume that
create_ssl_context
would not have been written with ahttp2
parameter unless it was useful, yet thehttp2
argument is never used in the code as these are the only two lines of code who call it.Are those two lines correct or should
http2
be passed onwards?Beta Was this translation helpful? Give feedback.
All reactions