fix(http2): translate the Host request header to :authority #11627
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11627"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-10-26T23:41:41Z.
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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T23:43:53Z.
Review: APPROVED
Reviewed exact head
eb9aa573a85a26502d94244a42d629384d0e1cbb. The request builder selects the last configured Host value as:authorityand 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:authorityand nohost. 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.Imported from boykopovar/AnyPS5. Originally posted by karimibrahim07 on 2026-10-29T04:28:17Z.
Review: COMMENTED
Windows run with a negative control, at head
eb9aa573a8merged ontomainb433c40f2fwith 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.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
Hostset 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:authoritychanges. The debt entry records that aHostdiffering from the URL authority isn't measured. Nothing to change from my side.AI-assisted: yes