fix(libSceHttp2): send version-3 requests to http:// URLs as HTTP/1.1 #12456
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12456"
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 p3n1cillin on 2026-10-28T14:25:48Z.
What
Depends on #11611, which adds HTTP/1.x to libSceHttp2. This branch is on its head
908e500399, so until #11611 merges the diff below includes its commits. This PR's own commit isac0a4df422. JJenkx asked for it as a follow-up on #11611 (comment and replies).A version-3 request to an
http://URL is now sent as HTTP/1.1. With #11611 it throwssceHttp2: unsupported version or cleartext HTTP/2. OliSe Player (PPSA01153) stops on that throw when it fetches music.netxm.ccallssceHttp2CreateTemplate(http, USER_AGENT, 3, 1)and fetches onlyhttp://URLs frommodarchive.organdftp.modland.com. Its header comment says all endpoints work over plain HTTP, and that it follows the ps5-payload-sdk sample.http2_get, uses template version 3 to requesthttp://192.168.1.1(line 168). The commit that added it is titled "add example on how to fetch content served on an http server".Request::Stateparses the URL before the version. A version-3 request tohttp://gets version 2, #11611's HTTP/1.1 path. Version 3 tohttps://is unchanged.h2cupgrade), and such a request staying on HTTP/1.1 after a redirect tohttps://. A version-3 HTTPS server that offers noh2, and a version-3 HTTPS redirect tohttp://, still throw.guest_http2_http1(Http1Transport) adds version 3 against the plain-HTTP loopback server. It checks the request goes out asHTTP/1.1, the upload arrives, the template header is inherited and the raw response headers come back. The existing version-3 HTTPS tests are unchanged.Tested
Windows 11 Pro (26300), Ryzen 5 7600X, WinLibs GCC 15.2.0, Release, full build of
ac0a4df422(merges cleanly into currentmain).Transport.cppand this test,guest_http2_http1fails withsceHttp2: unsupported version or cleartext HTTP/2.main5b8ba7b929sceHttp2: only HTTPS HTTP/2 transport is implementedmain+ #11611sceHttp2: unsupported version or cleartext HTTP/2158efd3040(same commit, before the restack)netxm: downloading http://api.modarchive.org/downloads.php?moduleid=166083 (Meltdown), thenNOW PLAYING: Meltdown [Scream Tracker 3] 8 ch (THE MOD ARCHIVE #166083)tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pylists #11575 and #11586 for sharing exports; both are #11611's own dependencies and come with it. The other libSceHttp2 PRs it could not compare (#11470, #11617, #11627, #11630, #11730, #11769, #11922, #11950, #12305, #12306) conflict withmainand share files #11611 changes. This commit touches onlyRequest::State's constructor,Http1Transportand 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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T15:50:17Z.
Review: COMMENTED
I reviewed the PR-specific commit
158efd3040bf30f58a1e13b3ee4815f93b151c62against its stated parent3ea7b2fe45fb3480fe384299264730bb36e429e4. That commit only changes version-3 cleartext requests to select the existing HTTP/1.1 path, adds a version-3 case to the HTTP/1 loopback test, and records the unmeasured console wire/redirect behavior in debt. The test preserves version-3 HTTPS cases. I have not run the transport tests locally.The PR branch still has
DIRTYmerge state and is based on the older #11611 head3ea7b2fe45; #11611 has advanced tofc5defa1c0and also reportsDIRTY. I understand from the thread that the parent stack is awaiting a debt-file rebase. Please restack this follow-up on the refreshed #11611 head once that lands, then I can review and validate the integrated branch. This is a focused commit review, not approval of the current stack.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T06:38:23Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The version-3
http://→ HTTP/1.1 change is small and correct, and its test and negative control behave as described. The branch does not merge into currentmain, though:docs/dev/debt/libSceHttp2.mdconflicts.What I ran
158efd3040bf30f58a1e13b3ee4815f93b151c62(stacked on #11611's older head3ea7b2fe45; merge base withmainis2227f1366188cda5699dd20e2e756a18006a5d4b)main:2960e9a6e7e1fc99c4ed180c71495b5eb83464c7BUILD_TESTING=ON, a clean worktree.Results
maindocs/dev/debt/libSceHttp2.md. All code files merge automaticallygit diff --checktools/check_conventions.py --base origin/mainAll conventions checks passed.ctest -R http2, PR headguest_http2_dns_first, is registered only on Windows)ctest -R http2, code merged ontomainguest_http2_http1with parentTransport.cpp)guest_http2_redirectsat 11.8 s, under the 30 s limitctest, PR head
Merge conflict
Negative control
I restored only
core/libs/prx/libSceHttp2/Transport.cppfrom the parent commit3ea7b2fe45, which is this PR's own production change, and kept the new test.guest_http2_http1then aborts:With the PR's file restored and rebuilt, it passes again. I did not revert to
main'sTransport.cpp, because the rest of the test file depends on #11611's HTTP/1.x transport.Findings
Blocking
main. The conflict is indocs/dev/debt/libSceHttp2.md. The author has already said in the thread that it comes from #11611, and MarcZX10 noted theDIRTYstate. One thing their comments don't mention: the resolution can't just take #11611's side. At the PR head, the TLS-settings entry (line 36) sayssceHttp2GetMemoryPoolStats"throws for live contexts".main(#11616) has since changed the code to report the pool size with zero use, andExport.cpponmaindoes exactly that; the code merges cleanly and keeps that version. The resolved entry needsmain'sGetMemoryPoolStatssentence and #11611's SSL-callback sentence. #11611 is also still open and conflicting (headfc5defa1c0), so this PR can't merge before it does.Fix: restack on the refreshed #11611 head, or on
mainonce #11611 merges, and merge the two TLS-settings sentences as described.Non-blocking
http://request "stays on HTTP/1.1 when redirected tohttps://, as it does here". It follows fromversionbeing rewritten to 2 atTransport.cpp:340. After the rewrite, the redirect offers ALPNhttp/1.1and accepts only that or no ALPN (lines 458-469). Anh2-only HTTPS target therefore fails. No test pins this down:RedirectFollowandRedirectFailuresuse only version-3 HTTPS origins. Aguest_http2_redirectscase with a version-3Http1Plainorigin redirecting to an HTTPS target would keep the documented behaviour from changing silently.main". The branch's merge base is2227f13661, so this line does not hold at the moment. It becomes true after the restack.The code change itself looks correct.
urlnow comes beforeversionin both the member declarations and the initializer list, sourl.secureis ready whenversionis initialized. The range check atTransport.cpp:343still validates the caller's rawversionparameter. The version-3 HTTPS checks still apply: the ALPNh2requirement at line 469 and the cleartext-redirect throw at line 905.RedirectFailuresmode 4 still covers that throw, and the test passes.Not verified
http://request (HTTP/1.0, HTTP/1.1, or anh2cupgrade). The debt entry already says this is unmeasured.mainrun took the PR side of the debt file only to build and test the code; I did not review a resolved debt entry.guest_http2_dns_firsttest.To get this to a good state
mainafter #11611 merges). When resolving the debt file, keepmain'ssceHttp2GetMemoryPoolStatssentence and #11611's SSL-callback sentence.http://→https://redirect case toguest_http2_redirects.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T12:55:21Z.
Review: APPROVED
Re-checked — approved
The branch now sits on #11611's refreshed head
326ca980d1, the PR's own commit is byte-identical to the one I reviewed (git range-diffreports=), thedocs/dev/debt/libSceHttp2.mdconflict is gone, and the merged tree builds and passes the libSceHttp2 tests on Linux.What changed since my last review
158efd3040toc887cb2637. The only difference is the base: #11611's two new commitsf73e0e3f88(mergesmainup toba5b5330b3) and326ca980d1(debt doc). This PR's own commitc887cb2637has the same patch as158efd3040.RedirectFailuresmode 4 still covers the version-3 HTTPS →http://redirect throw. #11611'sfc5defa1c0("stop requiring unsupported paths to throw") has since dropped that case, so no test exercises it now. The throw is still in the code atTransport.cpp:905, which matches this PR's debt entry. Dropping the test was #11611's change, so I am not raising it here.Unblocks.What I ran
c887cb2637b8ef9a2ce336b38ce38fe7f424ca33(merge base withmainba5b5330b37724bca4b99f30faab504653635a04)main:899ae3d1ad32ccea94dc24e66fdc948ce8a88171BUILD_TESTING=ON, a clean worktree.main899ae3d1adgit diff --checktools/check_conventions.py --base origin/mainAll conventions checks passed.--target libs, merged treectest -R http2, merged treeguest_http2_redirects, took 11.4 sguest_http2_http1aborts with #11611'sTransport.cppand passes with the PR'sctest, merged tree
Negative control
Previous findings
main: Resolved. The merge is clean. The resolved TLS-settings entry (libSceHttp2.mdline 36) keeps both #11611's "SSL callbacks use the verification adapter" sentence andmain's sentence thatsceHttp2GetMemoryPoolStatsreports the pool size with zero use, as I asked.http://→https://redirect: Still open. The commit did not change, andguest_http2_redirectsstill uses only version-3 HTTPS origins. The behaviour is unchanged and documented in the debt entry, so this is still optional.main": No longer applies. The base is #11611's head, which mergedmainatba5b5330b3, and the branch merges cleanly into today'smain.New findings
Blocking
None.
Non-blocking
mainonce #11611 is in, so that the squash or merge carries onlyc887cb2637. The description already says this underDepends on.Not verified
http://request. The debt entry marks this as unmeasured.guest_http2_dns_firsttest. These are author-reported.f73e0e3f88and326ca980d1. They belong to #11611's review, so I only built and tested them as part of this tree.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T19:56:27Z.
Review: APPROVED
Re-checked — approved
The branch was restacked onto #11611's head
46777c4d2c. The PR's own commit, now8432e0b64a, has the same code and test changes as thec887cb2637I reviewed before. Only the context line of its debt hunk differs, because #11611's base text changed. The merged tree builds, the libSceHttp2 tests pass, and the negative control still fails.What changed since my last review
c887cb2637to8432e0b64a.git range-diff(delta) shows that every changed commit belongs to #11611:eeea4a5fbb("stop pinning unsupported downgrade refusal");717e3e78c2("stop requiring unsupported HTTP1 gzip inflation to fail");main.Transport.cpphunk is identical:urlis parsed beforeversion, and a version-3http://request becomes version 2 (Transport.cpp:346).{Mode::Http1Plain, 3}test case is identical.!in the range-diff is the error-paths context line, which picked up the resolve-retry sentence frommain.public_headers, conventions and the control). I accept these as author-reported.mainand runs 60 s on this head. I did not run any title, so this is also author-reported.What I ran
8432e0b64abb7cc782e50501d6c9f76052fa715dmain:c955a63d3d20822e13bb1c6b55ac5800ca5e41766e1803a450d657f8b57086a901addd3f772e48eeBUILD_TESTING=ON.mainc955a63d3dgit diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)unwrap_self) that also fails onmain, no new failures or timeoutsctest -R http2, merged treeguest_http2_redirectsat 12.96 s.guest_http2_http1aborts with the parent'sTransport.cpp, and passes after the merged file is restoredNegative control
After restore:
100% tests passed, 0 tests failed out of 1Previous findings
mainonce #11611 is in. The description says so underDepends on.http://→https://redirect: Still open, and still optional.GuestHttp2Transport.cppadds no such case. The behaviour is recorded as unmeasured in the debt entry.New findings
Blocking
None.
Non-blocking
ac0a4df422, under What and Tested. The head commit is now8432e0b64a. Updating that would help reviewers who check the stack.Not verified
http://request. The debt entry marks this as unmeasured.eeea4a5fbb,717e3e78c2and itsmainintegrations). They belong to #11611's review; I only built and tested them as part of this tree.