Repository navigation
feat(http2): support synchronous HTTP/1.0 and HTTP/1.1 requests - #11611
Conversation
|
Follow-up diagnosis for the native TLS stop in the description: a debugger probe captured This is additional evidence for #11145, not a change to this PR's HTTP1 implementation or a full-current-main native validation. Private source Fresh-main follow-up: private Current-main functional result and complete baseline digest, SHA256 Tutorial and save-reload follow-up: main74acfad-based private |
|
@JJenkx A heads-up on how this composes with #11627 (edubox), which lets a guest-set We plan to land #11627 first. Could you then pick the effective Host once in the HTTP/1 sender (the configured value if there is one, otherwise the URL authority), skip it in the generic header loop, and add a loopback test for HTTP/1.0 and 1.1 that sets or replaces Host and checks exactly one Host line with the right value? |
|
Buffered deadline correction, head For the agent handling existing PR rebases: retain additive commits Native follow-up: private |
|
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.
|
|
@oneandonlydean Agreed: #11627 first. A private follow-up on #11611 Linux Release: all eight HTTP2 API/loopback groups pass, including 16 Host cases across HTTP/1.0 and HTTP/1.1, TLS and plain TCP: URL fallback, a mixed-case explicit override, request replacement of an inherited template Host, and append-mode last-value selection. Every case checks the actual wire version, exactly one Host field and its expected value. With only production Follow-up patch, peer-only integration patch, exact pins, eight-group logs and negative/restoration evidence. SHA-256 AI-assisted: yes. |
|
Correction (2026-10-28): this run built only the test targets, which load the unpatched libraries. Building the patched A Windows run of
|
|
Prepared the requested composition correction locally against #11611 Added 15 real loopback wire cases: HTTP/1.0 TLS, HTTP/1.1 TLS and HTTP/1.1 plain TCP, each checking URL fallback, template inheritance, direct request setting, replacement and append-last selection. The latter follows #11627's current effective-authority policy; console duplicate-header semantics are not claimed. Every case checks exactly one Host with the expected value. Negative test-only As requested, I have kept these commits local while #11627 remains open. Our separate rebasing agent has a local handoff containing the exact two commits to apply to the refreshed #11611 once #11627 lands; the private integration merge must not be published. The current public branch was not rewritten. The independent Windows |
|
A title that reaches this path: MXGP 26 (PPSA30839 01.003.000) submits its first request as HTTP/1.x through
Without #11575, this PR's redirect support covers MXGP's AI-assisted: yes (Claude Code) |
|
Tested on Alan Wake 2 (PPSA02572, 01.200.007): Linux, RX 9070 XT (RADV), Release, relinked with
With #11145 the title stays on the first page of its license agreement: no input scrolls it (right or left stick, D-pad, L2/R2). So on this title, this PR moves the stop from the HTTP/1.x guard to the TLS failure. To get past the first export it also needs #11145, or #11922, which returns the console's code for a failed handshake instead of throwing (measured on a PS5: an untrusted certificate gives |
|
@JJenkx A Windows build problem in For a library, |
|
Following up on BunnyFl's Windows build report above ( A library import whose 11-character NID doesn't fit over its name now moves to the
AI-assisted: yes (Claude Code). |
|
God of War Ragnarök (PPSA08329) reaches this path. Below, test results are kept apart from what I read from the title's code. From the title's code (static disassembly of the unwrapped
Tests: this head
AI-assisted: yes (Claude Code) |
|
Separate follow-up #15221 implements the remaining HTTP/1 gzip path using the existing HTTP/2 decoder. It contains actual head |
|
Windows title check with FAR: Changing Tides (PPSA03766), on Windows 11 22621, Ryzen 9 5950X, Radeon RX 6700 XT (AMD 26.10.1), MinGW-w64 GCC 15.2.0 UCRT, Release. Converted with
This matches the Linux result on #10445: Windows needs the same two changes to get past start-up. One run each. AI-assisted: yes. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (5, not counted against this PR)Validation IDs already present on main (4 IDs in 468 tests)Skipped (6)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
0b9da5d to
4388212
Compare
|
Refreshed onto main The debt-file conflict retains main's TLS/context-option and pool-statistics text alongside the HTTP/1 deadline and gzip limitations. Source/test files merge automatically; the production transport/header/export/CMake patch plus Fresh same-host Linux Release checks: main's HTTP/2 groups 9/9; change's 10 HTTP/2 groups plus pool statistics 11/11, zero skips. Source and loaded-library hashes stay unchanged during the change run; conventions and Commands, patches, range-diff and full logs — SHA-256 |
XairRrR
left a comment
There was a problem hiding this comment.
Re-checked — approved
Since my last review, the branch was rebased onto current main as three linear topic commits. #11586 is merged now, so main supplies the SSL-callback code. The HTTP/1.x gzip debt entry moved into ### Functional. The PR merges cleanly, builds, passes all ten guest_http2* groups, and the Host regression test still fails without the Host fix.
What changed since my last review
- Rebase. The head is now
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.- Debt file. The HTTP/1.x gzip entry is now under
### 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. - Description. It now has no open dependency ("#11586 and #11575 merged") and gives the new head and base.
What I ran
Head 438821252fc1fd8c2f9c82d57bb65c57a4300d8b, main 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged tree 3acad1db1d621c02dc15796095d743af4f1054a5. Debian 13 VM (Xeon Gold 6136), GCC 14.2.0, Release, Ninja, in a clean worktree.
git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...438821252fc1fd8c2f9c82d57bb65c57a4300d8b
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
git diff 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 438821252fc1 -- docs/dev/debt/libSceHttp2.md core/libs/tests/GuestHttp2.cpp core/libs/prx/libSceHttp2
git diff 3f9c054d18 9a05af1539 --stat
ctest --test-dir build -R '^guest_http2' -j8 --test-load 32 --output-on-failure
# negative control
git show 3f9c054d18:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests
ctest --test-dir build -R '^guest_http2_http1$' --output-on-failure
# restore
git show 3acad1db1d621c02dc15796095d743af4f1054a5:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
git status --porcelain
ninja -C build -j32 -l32 libSceHttp2 guest_http2_transport_tests
ctest --test-dir build -R '^guest_http2_(http1|redirects|transport|ssl_callbacks)$' -j4 --test-load 32 --output-on-failure| Check | Result |
|---|---|
Merge onto main |
Clean |
git diff --check |
Clean |
check_conventions.py |
All conventions checks passed. |
Build and libs (script) |
OK |
| Selected tests (script, 827 run) | 824 pass, 2 skips (all expected), no new failures or timeouts. unwrap_self_..._group also fails on main. |
guest_http2* on the merged tree |
10/10 pass. Slowest: guest_http2_redirects 13.31 s, guest_http2_transport 7.7 s, guest_http2_http1 6.5 s. All are under 30 s. |
| Vulkan validation | Skipped: the PR changes no AGC, shader recompiler or VideoOut files |
Negative control output
2519 - guest_http2_http1 (Subprocess aborted)
HTTP2: HTTP1 exactly one overridden host header
Negative control
I restored Transport.cpp from 3f9c054d18, the commit just before the Host fix. I kept the head's tests and rebuilt libSceHttp2 and guest_http2_transport_tests. guest_http2_http1 then aborted at HTTP1 exactly one overridden host header. After I restored the merged file and rebuilt, git status --porcelain was empty and guest_http2_http1, _transport, _redirects and _ssl_callbacks passed again. The CONNECT test change only removes an assertion, so it needs no control.
Previous findings
- HTTP/1.x gzip entry in the wrong section, and no newline at end of file: Resolved. The entry is now at libSceHttp2.md:53, under
### Functional, and the file ends with\n. - The Host debt entry describes only HTTP/2: Still open (non-blocking). libSceHttp2.md:42 still says that a guest
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. - Whitespace before
;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
- Windows, titles and real remote servers: I ran only the loopback tests. The author reports that this head passes 11/11 groups on Linux; I accept that as their report. The Windows and title results in the description belong to earlier heads.
- How the console behaves for the unknowns in the debt file: Host semantics, HTTP/1 header serialization, and the timing of buffered reads against the deadline.
- A full-production negative control for the HTTP/1.x transport itself.
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.
|
Windows check of the refreshed head Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, WinLibs GCC 15.2.0 r7 (UCRT), Release,
Negative control: I put Not tested: real servers or titles. Everything here runs against the loopback test servers. AI-assisted: yes (Claude Code) |
|
Title evidence on the current head
One run each. AI-assisted: yes. |
|
Windows run of exact head Setup: Windows 11 Enterprise 22621, Ryzen 9 5950X, WinLibs GCC 15.2 UCRT, Release,
These are loopback tests only. I did not run titles or contact real remote servers. AI-assisted: yes. |
|
Linux check of the current head
AI-assisted: yes. |
Resolve the HTTP/1.x transport merge (boykopovar#11611): keep both includes in Transport.cpp, and add Cookie and CookieFlood to the test Mode enum after StallUpload, outside the Http10..Http1Plain and EarlyFinal ranges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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)