feat(http2): serialize HTTP/2 response and trailing headers #12305
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12305"
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-28T08:35:31Z.
What
sceHttp2GetAllResponseHeadersthrew for every request. It now serializes the decoded HTTP/2 header block asHTTP/2.0 <code> HTTP2 NO PHRASE\r\n, then one<name>: <value>\r\nline per header with the lowercase name HTTP/2 reports, a consumed:statuspseudo-header and a final\r\n. It also exportssceHttp2GetAllTrailingHeaders(CjxqMyx2-pU): the trailer HEADERS frame is collected separately and serialized as one<name>: <value>line per field plus a final, without a status line. Both buffers live until the request is deleted; a null out pointer, an unavailable response or a response without trailers still throws.Evidence for the contract: the decrypted firmware 11.00
libSceHttp2.prxfrom a retail console.sceHttp2GetAllResponseHeaders(0x15e0) calls the helper at0x5210, which returns the block built by the serializer; the status line isstrlcpy("HTTP/2.0")+" "+ status +" "+"HTTP2 NO PHRASE"+"\r\n",:statusis consumed, each other header is appended asname: value\r\nwith the name nghttp2 reports, and a final\r\nis added.sceHttp2GetAllTrailingHeaders(0x16b0) returns its cached block through the helper at0x5340; the console's exact trailer serialization was not measured, so it follows the response serializer without the status line and the debt entry records that. This replaces the previous HTTP/1.1 status line and local reason table, which were guesses.Tested
Linux x86-64 (CachyOS), GCC 16.2.1, Release:
ctest --test-dir build -R '^guest_http2'passes 8/8 (guest_http2_transport7.0 s,guest_http2_redirects11.9 s). The transport fixture now asserts theHTTP/2.0status line, theHTTP2 NO PHRASEreason, the lowercase header block, and anghttp2_submit_trailerresponse's `x-trailer: yesx-trailer-two: 2
block;check_conventions.py --base origin/mainandgit diff --checkare clean. Rebased ontomaina4eca2a056; the focused tests pass 8/8 on the refreshed headbf96b8a0f5`, and the response and trailer serialization entries are in the debt file.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-28T08:46:18Z.
Review: COMMENTED
The implementation is coherent with the local parse helpers, and the updated Windows job plus conventions, eligibility, intake, and report checks pass. The author reports the focused Linux tests; hosted Linux is skipped. One test improvement would strengthen the central claim:
guest_http2_transportcurrently checks the status-line prefix, a representative header and the CRLF terminator, but does not pass the returned block throughsceHttpParseStatusLineandsceHttpParseResponseHeader. I have not approved: the exact PS5 HTTP/2 serialization (including status-line version/reason phrase and pseudo-header handling) is still explicitly unverified, and the current tests establish only the chosen local format.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T09:10:57Z.
Review: CHANGES_REQUESTED
The added round-trip through
sceHttpParseStatusLineandsceHttpParseResponseHeadershows that the chosen local string format is self-consistent, but it does not establish thatsceHttp2GetAllResponseHeadersreturns this HTTP/1.1 status line, local reason phrase, lowercase field names, or excludes HTTP/2 pseudo-headers on the PS5. The PR and debt entry still state that the console format is unknown. UnderAGENTS.md, keep unknown generic behavior throwing until the contract is supported by console observation, SDK documentation, or a reliable implementation that models this export; alternatively, provide that evidence and tests for the established format. The current checks are queued after the rebase. No approval.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T09:40:43Z.
Review: CHANGES_REQUESTED
The Windows workflow now fails during CMake configure on this PR’s change at
core/libs/prx/libSceHttp2/CMakeLists.txt:60:set_tests_properties called with incorrect number of arguments. TheENVIRONMENT_MODIFICATIONproperty has a second value without a property key; combine both PATH edits into one semicolon-separated value or make a second complete property call, then rerun Windows CI. Existing blockers also remain: the PR still lacks evidence for the PS5 response-header serialization contract (the local round-trip proves only self-consistency of the chosen format), and the overlap with #11950 still needs merge-order coordination in the checklist. I have not approved.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-28T11:36:55Z.
Review: CHANGES_REQUESTED
Thanks for the rebase and for fixing the Windows
ENVIRONMENT_MODIFICATIONconfigure error. The remaining blocker is the same one @MarcZX10 raised:core/libs/prx/libSceHttp2/Transport.cpp:455-457: the status line (HTTP/1.1, the localReason()table), the lowercase names and leaving out pseudo-headers are all guesses.docs/dev/debt/libSceHttp2.md:35says so too. The round-trip throughsceHttpParseStatusLine/sceHttpParseResponseHeaderonly shows the block agrees with our own parser.sceHttp2GetAllResponseHeadersis marked(STUBBED)and just calls its HTTP/1 function, so it is not evidence of the PS5 block. KytyPS5 returns a null block with size 0 and prosper reports the response as unavailable; neither shows a format.Generic behaviour whose format is unknown keeps throwing (AGENTS.md). To land this, please give evidence of the real block: a capture or log from a console or a PS5 title showing the bytes, SDK documentation, or a reference that measured it. Then the test should pin those bytes (reason phrase, header case, no
:status). Also:Depends onsays none, but #11950 changes the same response-header hunk inTransport.cpp. Agree the merge order with its author and record it.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T08:34:42Z.
Review: APPROVED
Re-reviewed exact head
942c78cd668d2e8b4cd4d0150b1eb094418ccd70against currentupstream/main4c7d275bef89d309313d16bc2bc05d37a1b50be2. The added firmware 11.00libSceHttp2.prxevidence now grounds theHTTP/2.0 <status> HTTP2 NO PHRASEline, pseudo-header handling, lowercase header names and CRLF framing; this resolves the earlier unsupported-format concern. The #11950-first order is agreed with its author and #12305 records the dependency. The author reports all seven focused HTTP/2 tests passing on this head, and hosted Windows and conventions checks pass. My current-main merge preview is clean;git diff --checkand conventions pass. I found no remaining blocker.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T12:18:01Z.
Review: APPROVED
Re-checked — new head, looks good
The exact-head rebase preserves the previously reviewed firmware-backed header serialization; I found no new blocking issue.
What I ran
Reviewed head
f9f902b27f300ea781e129058204869b5e15914dagainst PR baseb8f0a6b2025605b78eb70646bda79f458a577c82and livemainat the same SHA. The current-main merge preview is clean. Environment: Linux x86-64, Python 3.11.2; no local build or C++ tests were run.Results
guest_http2testsUnedited local output
git diff --checkproduced no output and exited 0. The stack report saysAll heads unchanged: True, both current-main merge previews areclean, and the dependency order is#11950 → #12305.Negative control
Findings
Blocking
None found on this head.
Non-blocking
77c3d1d37901f4ca83a87a7b19cf654e30de80a4is not included in this branch. The PR records the intended landing order and overlapping files. Keep #11950 first, then rebase and recheck this PR before merging.Sources
Not verified
I did not run a local build, focused tests, or a negative control. Linux hosted product tests are skipped by workflow policy.
To get this to a good state
Keep the documented #11950-first order. After #11950 lands, rebase this branch and rerun the focused tests on the resulting head; I will recheck that head.