feat(http2): support synchronous HTTP/1.0 and HTTP/1.1 requests #11611
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11611"
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 JJenkx on 2026-10-26T22:43:31Z.
What
Adds synchronous HTTP/1.0 and HTTP/1.1 requests to
libSceHttp2over HTTP or TLS, using the existing nonblocking DNS/socket/TLS machinery and the sharedlibSceHttpstatus parser. Version 3 remains HTTPS with ALPN h2. Supports uploads, fixed-length/chunked/close-delimited responses, raw HTTP1 headers, inherited settings, redirect and certificate callbacks, early final responses, and existing abort/deletion/deadline handling. Malformed and unsupported framing throws; the console ABI/error-mapping gaps remain documented.Based on main
04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, which already includes merged SSL-callback #11586 and redirect #11575. This branch is now only three HTTP/1.x topic commits on that main, without merge commits. Keeps main's #11627 Host-header support. HTTP/1 uses the effective template/request Host override once, instead of adding both the URL Host and a second custom Host. Main's HTTP/2HostAuthorityregression and this branch's HTTP/1 framing/deadline/cancellation fixtures are retained.HTTP/1 gzip inflation remains unsupported. With inflation disabled, tests retain raw compressed bytes and wire lengths; enabled identity responses and bodyless HEAD remain covered. Tests do not require unsupported enabled HTTP/1 gzip inflation to throw. Peer #9834 implements a different library, not this cancellable HTTP/1 path.
Tested
Current-main refresh (2026-11-03), head
438821252fc1fd8c2f9c82d57bb65c57a4300d8b. Rebased as three topic commits onto04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, without merge commits. #11586 is now merged atdb0f0c4d44d, so SSL callbacks are supplied by main and there is no open parent dependency. The only conflict was the debt file: retained main's TLS/context-option and pool-statistics text, added the HTTP/1 deadline/gzip limitations, and kept the gzip item in the Functional section. Main's updated generic callback checks are preserved.The production transport/header/export/CMake patch and
GuestHttp2Transport.cpphave identical stable patch IDs before and after the rebase (462dbc9554d2ee99d4166dfa89a04f04a8e3ccf2). The later Host-header and CONNECT-test commits are unchanged in the range-diff.Fresh Linux Release: main passes its 9
guest_http2*groups; the refreshed branch passes all 10guest_http2*groups plusguest_memory_pool_stats(11/11, zero skips). This includes HTTP/1 framing/upload/deadline/Host cases and the existing HTTP/2 transport, SSL/redirect callbacks, roots and teardown checks. The candidate source stays clean and five loaded-library hashes remain unchanged throughout the run. Conventions and whitespace checks pass.Current source pins, range-diff, patch-identity comparison, build and verbose test logs — SHA-256
c0d3eaee77d2d9950e5f7a872a88aa37cf0f5cfd79467c4e15fb2257148c8ac5.Earlier Windows, title and negative-control results follow with their original revisions. No new Windows or title run is claimed for this refresh.
Test review update, head
0b9da5dc5a84: removes only the assertion that sending an unimplemented CONNECT request must throw, as requested by oneandonlydean. Child creation, deletion/invalid-handle checks and production CONNECT refusal remain. The revisedguest_http2_testsexecutable was rebuilt in an isolated worktree and passed three consecutive Linux Release runs against the immutable raw libraries built from parent88ad9dabd393;lddand library hashes were recorded. No production source changed. Full-suite and independent Windows results below refer to their explicitly named earlier heads; no new Windows execution is claimed for this test-only revision.Exact head
88ad9dabd393994eab72f4d2949969c570031402, Linux 7.2.11, Ryzen 9 7950X, GCC 16.2.1 Release, independently rebuilt production libSceHttp2 and selected test executables.guest_http2*groups plusguest_memory_pool_stats, repeated three times: 33 passes, zero skips. Includes HTTP/1.0 and HTTP/1.1 over TLS/plain HTTP, framing, uploads, redirects/certificate callbacks, buffered deadlines, cancellation, roots, HTTP/2 transport and teardown.HTTP1 exactly one overridden host header); rebuilding only libSceHttp2 passes with the byte-identical frozen test executable SHA-2565587ee0ca05d85f776eb0775029214ebdd338549036e2183fccae04755ab37fb.public_headers, conventions against mainb28bb7721777and whitespace checks pass. Local merge-tree checks against that main and the actual updated parent are clean.Exact pins, source patches, negative/frozen-positive logs, build and repeated-test logs/JUnit, SHA-256
15f25922fd85c6dc03e2a44b4e35d2243f07cd610d5c99b946636bde470de9a8. The bundle retains the failed local preparation attempt and corrected build receipt.B-Howell independently qualified this exact head on Windows 11 Pro 26300 with WinLibs GCC15.2.0r7/UCRT Release: 12 HTTP2/statistics groups each pass three runs (36 passes, zero skips), including the HTTP/1 Host regression. Public headers/conventions pass; the same head passes 11 groups three times (33 passes) on Ubuntu22.04/WSL2 GCC11.4.0. Their unchanged-test control fails with parent Transport.cpp and passes after restoring this head; additional five-mode probes confirm template, request-replacement and appended Host each serialize exactly one effective field. These are their independently reported runs. Historical Windows qualifications keep their earlier pins. FAR PPSA03766 reaches the underwater tutorial with #11586 and historical #11611
7fcc24a04607in the current-main comparison; it is not a native qualification of the new Host fix. No new console, GPU, audio, extended gameplay or performance claim.Independent Windows validation from B-Howell covers exact head
438821252fagainst separately built main04a9eb4fa2: Windows 11 Pro 26300, Ryzen 7 7800X3D, WinLibs GCC 15.2.0 r7 UCRT, Release. Main's ten HTTP2 groups and the head's twelve HTTP2/pool-stat groups each pass three runs, with no head skips. Restoring main's three production files while retaining this head's tests fails the HTTP1 group in all three runs; the remaining eleven groups pass. Restoring/rebuilding the head passes all twelve. These are the contributor's loopback results, not an author-run Windows or real-server/title test.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 XairRrR on 2026-10-29T06:45:44Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The HTTP/1.x transport builds and passes all ten
guest_http2*groups, both at the head and merged ontomainwith the conflict resolved locally, and the negative control fails as it should. The branch still conflicts withmainindocs/dev/debt/libSceHttp2.md, and that conflict is what blocks it.What I ran
fc5defa1c0ad8e98b3dc7dcdae52544939e6f7efmain:2960e9a6e7e1fc99c4ed180c71495b5eb83464c7(the conflict is the same on the newermainf734bb8a9ea4e50e32f79cd99c579c4b452743c9, which changes nothing under libSceHttp2, libSceHttp, libSceNet or libSceSsl)Results
maindocs/dev/debt/libSceHttp2.md(only file)git diff --checkcheck_conventions.pyAll conventions checks passed.guest_http2*at headguest_http2_redirects11.2 sguest_http2*on merged treelibson merged treelibSceHttp2.prx(OK: .../libSceHttp2.prx)--http1aborts on the old guard; the other modes passctest at head
ctest on merged tree
Conflict hunk
Negative control
On
mainthe old test sources do not compile against this branch's tests, because the typed callback declarations ininclude/Http2.hpp(Http2RedirectCallback,HttpsCallback) no longer acceptvoid*. For a control that builds, I put the five libSceHttp2 production files back to6513822739, the #11586 tip inside this branch, which is just before the HTTP/1.x commits, and kept this PR's tests:guest_http2_transport_tests --http1aborts (exit 134):sceHttp2SendRequest: HTTP/1.x transport is not implemented not implemented.--ssl-callbacks,--redirects,--earlyand the default mode pass.So the HTTP/1.x group depends on the new transport code. The redirect and SSL-callback groups pass without the HTTP/1.x commits, so they test the stacked #11575 and #11586 changes, not this PR's own code.
Findings
Blocking
mainindocs/dev/debt/libSceHttp2.md. This confirms what oneandonlydean pointed out, and it is still present onmain2960e9a6e7andf734bb8a9e. The conflict is on the "libSceHttp2 TLS settings" bullet (head line 35,mainline 33). #11616 rewrote the end of that line (sceHttp2GetMemoryPoolStatsnow reports the pool size instead of throwing), and this branch rewrote its start (SSL callbacks no longer throw). Resolving with only one side either brings back the outdated "throws for live contexts" text or keeps "nonnull SSL callbacks [...] throw", which this branch makes false. Keep this branch's first sentences and new "request deadlines" bullet, plusmain'ssceHttp2GetMemoryPoolStatsending and the PPSA01494/PPSA30839/PPSA31162 sentence.Non-blocking
main; they are not. The description says #11575 and #11586 "their commits are included on main74acfad". Both PRs are still open, and their commits (af93efe890,df94dd3ca5,6513822739) are in this branch's diff againstmain. TheDepends on: #11575, #11586line is correct. The sentence should say the commits are stacked in this branch, so the PRs have to land in order (or this one replaces them). The ticked "Based on currentmain" box also does not hold while the branch conflicts.;throws. In Transport.cpp:654, the size is parsed fromline.substr(0, line.find(';'))with no trimming, so a line like1a ;ext=vfailsNumber(..., 16). RFC 9112 section 7.1.1 allowsBWSbefore;inchunk-ext. It throws instead of misbehaving, so it does not break the rules, but trimming trailing spaces and tabs from the size token before;would accept every valid chunk line. If you keep it as is, add it to the debt entry.Not verified
To get this to a good state
mainand resolvedocs/dev/debt/libSceHttp2.mdkeeping both edits, as described in Blocking 1.;in chunk-size lines (Non-blocking 2).Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T11:25:49Z.
Review: APPROVED
Re-checked — approved
The new head is a maintainer merge of
mainthat resolves thedocs/dev/debt/libSceHttp2.mdconflict, the only blocking finding from my last review; the branch now merges cleanly onto currentmain, builds, and passes all tenguest_http2*groups.What changed since my last review
1822e724ec("Merge branch 'main' into feat/http2-http1-transport"), on top offc5defa1c0(the head I reviewed last time). It mergesmainat578b8311ac.git show --remerge-diffon that commit shows only one hand resolution, indocs/dev/debt/libSceHttp2.md. Every other change to the PR's files comes frommain: thesceHttp2GetMemoryPoolStatschange from #11616 and thesceHttp2Init(…, 0)change from #11730, inExport.cppandGuestHttp2.cpp, which merged without conflict. Nothing on the PR's side of the transport, its tests or the build files changed.What I ran
1822e724eceaf37fae776510f7d4fbe559ee871fmain:ba5b5330b37724bca4b99f30faab504653635a04mainba5b5330b3git diff --checkcheck_conventions.pyAll conventions checks passed.guest_http2*on merged treeguest_http2_redirects11.41 slibson merged treelibSceHttp2.prxctest on merged tree
I did not repeat the negative control. The PR's own tests and production code are unchanged since
fc5defa1c0, where--http1aborted with the pre-HTTP/1.x transport restored.Previous findings
main's pool-stats ending (pool size with zero peak and current use) and the PPSA01494/PPSA30839/PPSA31162 sentence. The outdated "throws for live contexts" text is gone. This matches what I asked for, and what oneandonlydean asked for in the thread.74acfad". Both PRs are still open, and their commits are still in this branch's diff againstmain. The "Based on currentmain" box now holds.;in chunk-size lines: Still open. Transport.cpp:654 is unchanged. A line withBWSbefore a chunk extension still throws instead of misparsing, so this stays non-blocking.New findings
Blocking
None.
Non-blocking
None. The merge commit's only hand edit is the debt-file resolution above.
Not verified
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T12:06:33Z.
Review: APPROVED
Re-checked — approved
Since my last review, the branch has a clean merge of
mainand a one-line debt-file fix: the stale "default trust" bullet is gone. The branch merges cleanly onto currentmain, builds, and passes all tenguest_http2*groups.What changed since my last review
f73e0e3f88mergesmainatba5b5330b3into1822e724ec, the head I approved.git show --remerge-diff f73e0e3f88is empty, so the merge needed no hand resolution. None of the PR's transport code, tests or build files changed.git diff 1822e724ec 326ca980d1shows no change tocore/libs/prx/libSceHttp2/or the HTTP2 tests.326ca980d1deletes thelibSceHttp2 default trustbullet fromdocs/dev/debt/libSceHttp2.md. Onmainthat bullet still says HTTPS "uses only authorities explicitly loaded into the caller's libSceSsl context" (main, line 42). Since #11145 was merged, the transport also trusts the system CA list (Transport.cpp:455), and the Default TLS trust bullet already describes this. Removing the old bullet takes out a contradiction that is already onmain, so the change is correct.What I ran
326ca980d17e11d405d98c4c4b13c61a1121a19dmain:5454cd2e455994d992aca39335ce60507eeda1ebmain5454cd2e45git diff --checkcheck_conventions.pyAll conventions checks passed.guest_http2*on merged treeguest_http2_redirects11.40 slibson merged treelibSceHttp2.prxctest on merged tree
I did not repeat the negative control. The PR's tests and production code have not changed since
fc5defa1c0, where--http1aborted once the pre-HTTP/1.x transport was restored.Previous findings
74acfad". Both PRs are still open.;in chunk-size lines: Still open. The chunk-size parsing in Transport.cpp is unchanged. A size line with whitespace before the;of a chunk extension still throws; it is not misparsed.New findings
Blocking
None.
Non-blocking
326ca980d1. That bullet came frommain, not from this PR's topic. A line underWhatsaying the stale default-trust entry was dropped because #11145 superseded it would explain it to maintainers. This does not block the PR.Not verified
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T19:19:17Z.
Review: APPROVED
Re-checked — approved
Since my last review, the branch was replayed onto current
main, now carries #11586's SSL-callback commit, writes exactly one effectiveHostfield on HTTP/1.x (with a loopback regression test), and no longer requires the unimplemented CONNECT send to throw. It merges cleanly, builds, passes all tenguest_http2*groups, and the new Host assertion fails without the fix.What changed since my last review
main. #11575 was merged, and the branch was rebuilt asmainplus the TLS certificate callback commit (#11586,173968c47107) plus the HTTP/1.x transport. Compared withmain, the diff now also contains the SSL callback adapter:Verify_nid_no_patch, the sharedInvokeCallbackthat the redirect callback now uses too,guest_http2_ssl_callbacks, and the debt entry.88ad9dabd393).SendHttp1takes the last storedhostvalue, or the URL authority when there is none, writes it once, and skipshostin the generic header loop (Transport.cpp:668-673). This is the same selection the HTTP/2 path makes for:authority(Transport.cpp:864).Http1Transportsets a template Host, replaces it on the request, and checks that exactly onehostwith valuerequest.examplereaches the server in all five HTTP/1 modes. This addresses oneandonlydean's request and B-Howell's duplicate-Host probe.0b9da5dc5a84removes onlyRequire(Throws(... sceHttp2SendRequest(child ...)))fromGuestHttp2.cpp. The CONNECT child is still created and used for the deletion and invalid-handle checks, and the production refusal (Transport.cpp:350) is still there. This addresses oneandonlydean's request.What I ran
Head
0b9da5dc5a84ed9bc4a2e64b15ed57afe5fbaeb1,maina4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8, merged treea08ae068c0c9610ab5ef27e33d72dc4f8f83a863. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, Release, Ninja, a clean worktree.maingit diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)unwrap_selfalso fails onmain. Twomain_sync_renames_*tests that fail on the baseline pass here; this PR does not touch them.guest_http2*on merged treeguest_http2_redirects12.75 s,guest_http2_transport7.40 s,guest_http2_http16.22 s,guest_http2_ssl_callbacks2.22 sNegative control output
Negative control
I restored
Transport.cppfrom3ee4e2bc6657, the commit just before the Host fix; it differs from the head only in the Host lines. I kept the head's tests and rebuilt.guest_http2_http1then aborted atHTTP1 exactly one overridden host header. After restoring the mergedTransport.cpp, it passed again, andgit status --porcelainwas empty. The test removal in0b9da5dc5a84needs no control.Previous findings
173968c47107as included. That matches the history.;in chunk-size lines: Still open (non-blocking, unchanged). Transport.cpp:724 still passes everything before;toNumber. A size line like8 ;extthrows instead of being misparsed, so this is safe.New findings
Blocking
None.
Non-blocking
Hostheader "becomes the request's:authoritypseudo-header and is not sent as aHostfield". On version 1/2 requests it is now sent as the singleHostfield. Suggest adding a clause such as "on HTTP/1.x it replaces the URL authority in the oneHostfield".### Additional PS5 3.20 imports (xdCloudy #9485)instead of### Functional, and the file no longer ends with a newline. Moving the entry next to the existing gzip entry fixes both.Not verified
88ad9dabd3by B-Howell and the title runs by the author are as they reported them.main's production files. Earlier controls by B-Howell and BunnyFl cover the HTTP/1 transport.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T22:11:19Z.
Review: APPROVED
Re-checked — approved
Since my last review, the branch was rebased onto current
mainas three linear topic commits. #11586 is merged now, somainsupplies the SSL-callback code. The HTTP/1.x gzip debt entry moved into### Functional. The PR merges cleanly, builds, passes all tenguest_http2*groups, and the Host regression test still fails without the Host fix.What changed since my last review
3f9c054d18(HTTP/1.x transport),9a05af1539(one effective Host) and438821252f(CONNECT test), applied onmain04a9eb4fa2, with no merge commits. The range-diff shows commits 2 and 3 unchanged. Commit 1 differs from before only inGuestHttp2.cppanddocs/dev/debt/libSceHttp2.md. The SSL-callback adapter is no longer part of this diff, becausemainalready has it.GuestHttp2.cpp. Compared withmain, the PR removes one line: the assertion thatsceHttp2SetRedirectCallbackthrows on a context or cookie-box id. It also changes the sibling child toCONNECTand drops the send-throws assertion. Both removals match oneandonlydean's earlier requests to stop testing that unimplemented calls throw.### Functional, and the file ends with a newline. The transport entry is split into a behaviour entry and an ABI entry. A request-deadline entry is added. The TLS-settings and pool-statistics text frommainis kept.What I ran
Head
438821252fc1fd8c2f9c82d57bb65c57a4300d8b,main04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged tree3acad1db1d621c02dc15796095d743af4f1054a5. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree.maingit diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)unwrap_self_..._groupalso fails onmain.guest_http2*on the merged treeguest_http2_redirects13.31 s,guest_http2_transport7.7 s,guest_http2_http16.5 s. All are under 30 s.Negative control output
Negative control
I restored
Transport.cppfrom3f9c054d18, the commit just before the Host fix. I kept the head's tests and rebuiltlibSceHttp2andguest_http2_transport_tests.guest_http2_http1then aborted atHTTP1 exactly one overridden host header. After I restored the merged file and rebuilt,git status --porcelainwas empty andguest_http2_http1,_transport,_redirectsand_ssl_callbackspassed again. The CONNECT test change only removes an assertion, so it needs no control.Previous findings
### Functional, and the file ends with\n.Hostheader "is not sent as aHostfield". On version 1/2 requests, though, it is sent as the singleHostfield. A clause such as "on HTTP/1.x it replaces the URL authority in the oneHostfield" would fix this.;in chunk-size lines: Still open (non-blocking, unchanged). Transport.cpp:724 still passes everything before;toNumber. A size line like8 ;extthrows instead of being misparsed, so this is safe.New findings
Blocking
None.
Non-blocking
None.
Not verified
main'sExport.cppdoes not compile against this head'sTransport.hpp, becauseCreateRequest_nid_no_patchtakes a newversionargument. Earlier controls by B-Howell and BunnyFl cover the transport.