Tests: hop-by-hop headers in early hints responses - #89
Open
SEPURI-SAI-KRISHNA wants to merge 1 commit into
Open
Tests: hop-by-hop headers in early hints responses#89SEPURI-SAI-KRISHNA wants to merge 1 commit into
SEPURI-SAI-KRISHNA wants to merge 1 commit into
Conversation
9 tasks
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.
Proposed changes
Adds
proxy_early_hints_headers.t.Companion to nginx/nginx#1604 — this test does not
pass until that change lands.
The upstream sends
Connection,Content-Length,Transfer-Encoding,Keep-AliveandUpgradein its 103 (Early Hints) response. None of themshould reach the client: they are hop-by-hop header fields (RFC 9110, 7.6.1),
a 1xx response never carries content, and with HTTP/2 and HTTP/3 they make the
informational response malformed (RFC 9113, 8.2.2; RFC 9114, 4.2).
Covers HTTP/1.1, HTTP/2 and HTTP/3. The HTTP/1.1 check is scoped to the 103
header block only, since the final response legitimately carries
ConnectionandContent-Length.Against current nginx master the test fails as follows — note that HTTP/2 and
HTTP/3 forward all five fields:
With the fix applied:
The test is not vacuous: if early hints stop being emitted entirely, the
early hintsassertion fails first, and the HTTP/1.1 hop-by-hop check wouldthen be scoped to the final response headers and fail too.
Verified against a build with
--with-http_v2_module --with-http_v3_moduleand CryptX available, so no leg of the test is skipped.
Checklist
README.mdand/orCHANGELOG.md).