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
{{ message }}
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.
The only way to force http/1.1 is to supply your own ssl context like below:
from hyper.tls import init_context
ssl_context = init_context()
ssl_context.set_alpn_protocols(["http/1.1"])
try:
conn = HTTP11Connection('www.cloudflare.com:443', secure=True, ssl_context=ssl_context)
req = conn.request('GET', '/')
rep = conn.get_response() # now it works
except Exception as ex:
print(ex) # <-- this will print h2
I think HTTP11Connection should works without providing the ssl context. One way to fix this is to have another ssl context for HTTP11Connection. What do you think?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Sample code
Expected behavior is to use http/1.1 protocol.
The text was updated successfully, but these errors were encountered: