Repository navigation
fix(http2): translate the Host request header to :authority - #11627
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head eb9aa573a85a26502d94244a42d629384d0e1cbb. The request builder selects the last configured Host value as :authority and omits Host from the HTTP/2 field list, consistent with RFC 9113 §8.3.1; other forbidden connection/control headers remain rejected. The test exercises template plus request-level override with case variation and verifies the loopback server receives one :authority and no host. The author reports the focused transport and HTTP/2 tests pass and the game advances to the next unimplemented export. Hosted conventions, eligibility, intake, labels and report pass; product/relinker checks are skipped by path policy. I did not independently rerun the local loopback suite. No blocking issue found.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The tree also carried the open PRs #11945, #11899, #11859, #11772, #11087, #10789, #11354, all merged cleanly, so the run is a joint one; the tests of this PR are AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
karimibrahim07
left a comment
There was a problem hiding this comment.
Windows run with a negative control, at head eb9aa573a8 merged onto main b433c40f2f with nothing else applied.
Windows 11 Pro 26300, Ryzen 5 3600, WinLibs GCC 15.2 (UCRT), Release, Ninja.
guest_http2andguest_http2_transportpass 3 of 3 (--repeat until-fail:3). The verbose log showsHTTP2 host header scenariorunning beforeHTTP2 loopback transport passed, soHostAuthorityis reached on Windows.- Negative control:
Transport.cppfrommain, the PR's test kept.guest_http2_transportaborts at that scenario withsceHttp2AddRequestHeader: unsupported HTTP/2 control header not implemented, the Palworld stop from #12109.
Read through the diff: a request Host set with mode 0 replaces the template's, since the erase works on the lowercased key, and the test covers that with mixed case. TLS still connects to the URL's host; only :authority changes. The debt entry records that a Host differing from the URL authority isn't measured. Nothing to change from my side.
AI-assisted: yes
What
sceHttp2AddRequestHeaderrefused aHostheader as an HTTP/2 control header. Palworld (PPSA23126) setsHost: gaming-sdk.comon a request and stopped there. HTTP/2 carries the authority in:authority, and RFC 9113 section 8.3.1 says an HTTP/1.1Hostheader is translated to:authority. This stores the header, uses its last value as the request's:authority, and keeps it out of the wire header list. The other control headers still throw, and aHostvalue with whitespace is rejected.Tested
Linux (CachyOS), GCC 16.2.1, Release.
guest_http2_transportruns against the loopback HTTP/2 server and covers aHostinherited from the template and overridden on the request with different case, then checks that the server sees one:authoritywith the request value and noHostfield. Reverting the transport change makes that test fail at the missing:authority; restoring it passes.guest_http2,guest_http2_cookiesandguest_http2_early_responsestill pass. Palworld PPSA23126 advances from the control-header refusal tosceHttp2SendRequestAsync; that export remains unimplemented.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)