Repository navigation
Keep the HTTP/2 priority header and combine its field lines - #1274
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
The priority request header was consumed by the HTTP/2 stream and never reached the application, unlike HTTP/1.1. Each field line was also parsed on its own, so "priority: u=0" followed by "priority: i" reset the urgency to the default. RFC 9651 requires the lines to be combined before parsing.
arturobernalg
force-pushed
the
h2-priority-header
branch
from
November 26, 2026 08:50
fe5193c to
c6d3801
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.
Over HTTP/2 the priority request header never reaches the application. Tomcat parses it for the stream urgency and then drops it, so request.getHeader("priority") returns null, while over HTTP/1.1 the same request shows it. RFC 9218 calls it an end-to-end signal, so a servlet that proxies the request loses it.
Each priority field line was also parsed on its own. A request with "priority: u=0" followed by "priority: i" ended up with the default urgency, because the second line reset it. RFC 9651 section 4.2 says the lines MUST be combined into one value before parsing.
The header is now stored like any other request header, and the combined value is parsed once the header block is complete. A priority field sent in the trailers no longer changes the stream priority.
Tests are added to TestRfc9218.
This touches the same method as #1272. Whichever lands second needs the buffered PRIORITY_UPDATE applied after the header is parsed, since section 7 of RFC 9218 says the frame wins.