Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HTTP/1 upgrade to HTTP/2 in HttpClient #4382

Closed
sbordet opened this issue Nov 29, 2019 · 0 comments · Fixed by #4670
Closed

Support HTTP/1 upgrade to HTTP/2 in HttpClient #4382

sbordet opened this issue Nov 29, 2019 · 0 comments · Fixed by #4670

Comments

@sbordet
Copy link
Contributor

sbordet commented Nov 29, 2019

Jetty version
10.0.x

Java version
11

Description
Would be great to support HTTP/1.1 upgrade to HTTP/2 in HttpClient.
This should be doable given the resolution of #250, #1350 and #3537.

sbordet added a commit that referenced this issue Mar 13, 2020
* Moved implementation of UpgradeTo from HTTP2ServerConnection
  to HTTP2Connection, since now also the client connection
  can be upgraded to.
* Split HTTP2Session.newStream(), since now the client must
  be able to create the implicit stream 1 corresponding to
  the HTTP/1.1 upgrade request, so that the HTTP/2 response
  after the upgrade finds the stream.
* The HTTP/1.1 upgrade mechanism has been generalized.
  Before it was based on HttpConnectionUpgrader and a hook
  in HttpChannelOverHTTP.exchangeTerminating().
  Now it is based on UpgradeProtocolHandler that when sees
  a 101 response it will trigger the upgrade mechanism.
* Introduced ConnectionPool.accept(Connection) to transfer
  a connection from the HTTP/1.1 connection pool to the
  HTTP/2 connection pool after the upgrade.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Mar 17, 2020
Updated after first review.
Added more tests, fixed the upgrade over TLS case.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Mar 19, 2020
Added comments and fixed logging.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Mar 20, 2020
Issue #4382 - Support HTTP/1 upgrade to HTTP/2 in HttpClient.
@sbordet sbordet added this to To Do in Jetty 10.0.0 via automation Mar 20, 2020
@sbordet sbordet moved this from To Do to Done in Jetty 10.0.0 Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Jetty 10.0.0
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant