Repository navigation
[2.4.x] core: Do not offer 'h2' via Upgrade on TLS connections. - #837
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
arturobernalg
force-pushed
the
backport/httpd-59311-h2-upgrade-tls
branch
from
November 6, 2026 22:06
945c587 to
71d2a83
Compare
Member
|
@arturobernalg conflicts developed |
arturobernalg
force-pushed
the
backport/httpd-59311-h2-upgrade-tls
branch
from
November 28, 2026 19:29
71d2a83 to
8b885e3
Compare
Member
Author
Solved @covener |
* server/protocol.c (ap_get_protocol_upgrades): Exclude 'h2' from the list of protocols announced in the Upgrade response header when the connection is already using TLS. RFC 9113 section 3.3 requires HTTP/2 over TLS to be negotiated exclusively via ALPN; offering 'h2' through the HTTP/1.1 Upgrade mechanism on TLS is a protocol violation that some clients handle poorly. * test/modules/http2/test_103_upgrade.py (test_h2_103_06): Update to assert the corrected behaviour. * changes-entries/h2-upgrade-tls.txt: Add entry. PR: 59311 (cherry picked from commit 2403a34)
arturobernalg
force-pushed
the
backport/httpd-59311-h2-upgrade-tls
branch
from
November 29, 2026 12:33
8b885e3 to
d356995
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #836 (trunk 2403a34) to 2.4.x.
On a TLS connection httpd announced "Upgrade: h2" to HTTP/1.1 clients.
RFC 9113 section 3.3 requires HTTP/2 over TLS to be negotiated with
ALPN, so ap_get_protocol_upgrades() no longer lists 'h2' when the
connection is TLS. test_h2_103_06 is updated and a changes-entries
file is added.
Clean cherry-pick, same diff as trunk.
Checked on a 2.4.x build with "Protocols h2 h2c http/1.1": the TLS
response has "Upgrade: h2c" (before: "h2,h2c"), the cleartext response
still has "Upgrade: h2,h2c", and h2 over ALPN works.
Not covered here: 'h2c' is still announced on TLS and 'h2' on
cleartext connections. That is left for a follow-up.
Bugzilla: https://bz.apache.org/bugzilla/show_bug.cgi?id=59311