Skip to content

Support h2 upgrade - #985

Merged
hamnis merged 10 commits into
http4s:series/0.7from
cwe-dixa:feat/support-h2-upgrade
Jul 20, 2026
Merged

Support h2 upgrade#985
hamnis merged 10 commits into
http4s:series/0.7from
cwe-dixa:feat/support-h2-upgrade

Conversation

@cwe-dixa

Copy link
Copy Markdown
Contributor

Some clients (like the jdk HttpClient) expects to be able to upgrade an h1 connection to h2 by sending an Upgrade header.

Previously, the library only supported prior-knowledge h2, but this pr adds support for h1 -> h2 upgrades.

Added a couple of tests to verify and all existing tests pass as well.

@cwe-dixa

Copy link
Copy Markdown
Contributor Author

Tests are failing with mima (missing class) because I deleted the now unused prior knowledge handler.

Should I bring it back?

@hamnis

hamnis commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

yes, bring it back. it can just be a stub that throws execptions everywhere.

@cwe-dixa

Copy link
Copy Markdown
Contributor Author

yes, bring it back. it can just be a stub that throws execptions everywhere.

Brought it back. Had to add some nowarns, since it now throws exceptions instead.

Comment thread server/src/test/scala/org/http4s/netty/server/H2UpgradeTest.scala Outdated
@cwe-dixa
cwe-dixa requested a review from hamnis July 20, 2026 06:54
@hamnis
hamnis merged commit 88ee54b into http4s:series/0.7 Jul 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants