question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support HTTP/2 without TLS

See original GitHub issue

Would it be possible to force the httpx client to use HTTP/2 to communicate with the server without TLS?

I’m using it as

client = AsyncClient(http_versions=["HTTP/2"])

but it still (reasonably tho) uses HTTP/1.1.

Most of the clients are trying to negotiate the update to HTTP/2 over HTTP/1.1 before as well, which is desired behaviour, but it might be handy for easier development and/or debugging.

There’s hyper.HTTP20Connection that enforces h2, but it gets a bit out of sync from h2 itself.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
yeraydiazdiazcommented, May 7, 2020

Hi @indomirreg, I don’t we have plans in the near future to support this, certainly not pre 1.0. But I think we’re all in agreement this is something we could look into so I’m reopening this issue.

3reactions
florimondmancacommented, Nov 6, 2019

Ah, so the goal is to test the Uvicorn HTTP/2 implementation? 😄 Sounds exciting.

I think there’s not a pressing need otherwise to add support for unencrypted HTTP/2, and as you wrote it’s probably worth a different ticket spun up from this one.

If you all are OK with it I’ll close this, and open one about documenting usage of self-signed certificates. Thanks @gvbgduh!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do web browsers not support h2c (HTTP/2 without TLS)?
Technically. There are several technical reasons why HTTP/2 is much better and easier to handle over HTTPS: Doing HTTP/2 negotiation in TLS ......
Read more >
HTTP/2 Frequently Asked Questions
For HTTP/2 over TLS ( h2 ), if you do not implement the http1.1 ALPN identifier, then you will not need to support...
Read more >
HTTP/2 protocol | Can I use... Support tables for HTML5, CSS3 ...
HTTP/2 is only supported over TLS (HTTPS). See also the precursor of HTTP/2, the SPDY protocol, which has been deprecated and removed from...
Read more >
HTTP/2 without tls - Google Groups
HTTP2 supports both, decrypt and encrypt ways, however, browsers like Firefox ,Chrome, and IE, doesn't allowed this protocol without security protocols. Ref.
Read more >
HTTP/2 guide - Apache HTTP Server Version 2.4
It implements the complete set of features described by RFC 7540 and supports HTTP/2 over cleartext (http:), as well as secure (https:) connections....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found