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.

[Feature Request] Support "h2c"

See original GitHub issue

I know that okhttp now have already supported h2-prior-knowledge.

However, it is still inconvenient to use, because h2_prior_knowledge cannot be used with other protocols at the same time.

In my project, I use okhttp to access the REST APIs of other modules inside the project. Because the project will eventually be deployed on the intranet, there is no incentive to use https. At the same time, I need to use okhttp to access some external resources on the Internet. At this time, I have to instantiate two OkHttpClients. It is very inconvenient to always pay attention to which one to access which resource.

If okhttp supports h2c, it will be very convenient to be compatible with both h2 and http/1.1 servers. And it also matches the spirit of okhttp that recommending only one OkHttpClient.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
moonfruitcommented, Apr 28, 2019

It’s sadly to hear that.

1reaction
moonfruitcommented, Apr 15, 2019

Because http/2 support binary data format, persistent tcp connections, multiplexing, and header compression and reuse, http/2 will have a lower latency than http/1.1 and a higher throughput rate. So it will be the best companion for RPC. And for internal RPC, h2c is easier to deploy than h2 and has less stress on the hardware. For example, gRPC supports both h2 and h2c.

Read more comments on GitHub >

github_iconTop Results From Across the Web

H2C / Feature Requests - SourceForge
H2C Feature Requests. Brought to you by: onepremise · Summary · Files · Reviews · Support · Wiki · Tickets ▾ · Feature...
Read more >
H2C Smuggling in the Wild - Assetnote
This involved heavily modifying the golang net/http library to be able to support forcing multiple requests over a single http connection, and ...
Read more >
java - HttpClient : http 2 request sent via proxy has no upgrade ...
Evidently, OpenJDK's HttpClient is only able to send HTTP/1.1 requests to a proxy. Even if you specified HttpClient.Version.
Read more >
Consider implementing h2c (http/2 over TCP) - Bugzilla@Mozilla
We prefer secure connection over insecure connections. And new features are implemented only for secure connections. We will not support h2c in Firefox....
Read more >
Allow h2c and HTTP/1.1 support on the same listening socket
This ticket request an enhancement to allow simultaneous support of HTTP/1.1 and HTTP/2 on a plain TCP socket when using http2 . Without...
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