Skip to content

fix(http2): translate the Host request header to :authority - #11627

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
edubox:feat/http2-host-authority
Nov 2, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
edubox:feat/http2-host-authority

Conversation

@edubox

@edubox edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

What

sceHttp2AddRequestHeader refused a Host header as an HTTP/2 control header. Palworld (PPSA23126) sets Host: gaming-sdk.com on a request and stopped there. HTTP/2 carries the authority in :authority, and RFC 9113 section 8.3.1 says an HTTP/1.1 Host header 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 a Host value with whitespace is rejected.

Tested

Linux (CachyOS), GCC 16.2.1, Release. guest_http2_transport runs against the loopback HTTP/2 server and covers a Host inherited from the template and overridden on the request with different case, then checks that the server sees one :authority with the request value and no Host field. Reverting the transport change makes that test fail at the missing :authority; restoring it passes. guest_http2, guest_http2_cookies and guest_http2_early_response still pass. Palworld PPSA23126 advances from the control-header refusal to sceHttp2SendRequestAsync; that export remains unimplemented.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 11950 core/libs/prx/libSceHttp2/Transport.cpp L610

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.

Pull request Shared files not compared
PR 11470 docs/dev/debt/libSceHttp2.md
PR 11922 core/libs/prx/libSceHttp2/Transport.cpp
core/libs/tests/GuestHttp2Transport.cpp
docs/dev/debt/libSceHttp2.md
PR 14212 docs/dev/debt/libSceHttp2.md

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head eb9aa573a8, merged into main f759e165d9 (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

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 guest_http2_transport (2.99 s), guest_http2_early_response (0.05 s), guest_http2_dns_first (0.02 s), all passed (the batch's 14 tests: 14/14). Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@karimibrahim07 karimibrahim07 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_http2 and guest_http2_transport pass 3 of 3 (--repeat until-fail:3). The verbose log shows HTTP2 host header scenario running before HTTP2 loopback transport passed, so HostAuthority is reached on Windows.
  • Negative control: Transport.cpp from main, the PR's test kept. guest_http2_transport aborts at that scenario with sceHttp2AddRequestHeader: 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

@oneandonlydean
oneandonlydean merged commit cbfc0f0 into boykopovar:main Nov 2, 2026
11 checks passed
@edubox
edubox deleted the feat/http2-host-authority branch November 2, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants