feat(libSceHttp2): bind cookie boxes to templates and requests #11950

Merged
BunnyFl merged 9 commits from upstream-pr/11950 into main 2026-11-05 16:52:25 +00:00
BunnyFl commented 2026-10-27 13:46:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-10-27T13:46:51Z.


What

On main, sceHttp2GetCookieBox throws for every call, and since #10167 sceHttp2SetCookieBox throws for any nonzero box (the second negative control below). Ball X Pit (PPSA31872) binds a cookie box at start-up and stops about 10 s in with sceHttp2SetCookieBox not implemented (runs below). Before #10167 the call returned 0 and the title reached gameplay on main (#8966).

This binds cookie boxes as an emulator run of firmware 13.42's libSceHttp2.sprx does:

  • sceHttp2SetCookieBox(id, box) accepts a template or a request and a live box or 0 (unbind). Contexts, unused ids and unknown, deleted or other-kind boxes return 0x817B1100.
  • A new request copies its template's box; older requests and requests created before an unbind keep theirs. Deleting a bound box returns 0 and the requests holding it still report it.
  • sceHttp2GetCookieBox(id, int*) returns 0x817B1225 for a null output (before checking the id), otherwise writes 0 and returns 0x817B1100 for an invalid id, 0x817B1025 when no box is bound, or 0 and the box id. It writes 4 bytes.

A request with a bound box now sends the box's matching cookies in a cookie field and stores each Set-Cookie of the response in the box, using the store's existing matching and parsing (shared with sceHttp2GetCookie and sceHttp2AddCookie). That part is not measured: the run cannot reach the network, so it is recorded in the debt entry.

The HTTP/1.x path of #11611 does the same. This part is JJenkx's work: their commit a73753f129 is d6a8038853 here, with JJenkx as its author. B-Howell found the gap (comment) and tested JJenkx's commit on Windows and Linux (report). Thank you both. Box cookies are chosen by the request URL's scheme, sent together with any added with sceHttp2AddRequestHeader in one Cookie field as RFC 6265 section 5.4 describes, and each response Set-Cookie is stored in the box. Before it, an HTTP/1.x request on a template with a bound box sent and stored no cookies. This is not measured on a console either; the libSceHttp2 cookie transport debt entry records it.

The transport reads and stores those cookies while it holds the request's state mutex, and deleting a request holds the handles mutex while it waits for that state mutex. To avoid that deadlock, the cookie module keeps its own record of live boxes (added by sceHttp2CreateCookieBox, removed by sceHttp2DeleteCookieBox), and a box lookup no longer takes the handles mutex. The third negative control below shows the delete hanging without it.

Tested

Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON, on main 2ee8e9751a:

  • guest_http2, guest_http2_cookies, guest_http2_options, guest_http2_transport, guest_http2_early_response, guest_http2_dns_first and guest_http2_teardown pass, three runs each. guest_http2 covers the binding cases above. Two new guest_http2_transport scenarios: one binds a box holding one cookie, checks that the loopback server receives it, and that the server's Set-Cookie lands in the box; in the other the server answers with 1500 Set-Cookie fields, and once the first is in the box another thread deletes the request, which must return within 2 s. guest_http2_transport alone also passes ten runs out of ten, 3.1 s each.
  • With Transport.cpp, Cookies.cpp and Cookies.hpp put back to main's version and Export.cpp to this PR's first commit (tests kept), guest_http2_transport fails in all three runs at box cookie sent. With only main's sceHttp2SetCookieBox body put back, guest_http2 and guest_http2_transport fail in all three runs with sceHttp2SetCookieBox not implemented. With the library files of this PR's first commit, where a box lookup took the handles mutex (tests kept), the delete does not return in all three runs.
  • tools/check_conventions.py --base upstream/main passes.
  • Head d6a8038853 (with JJenkx's HTTP/1.x commit), Windows 11, WinLibs GCC, Release: ctest -R '^(guest_http2.*|public_headers)$' --repeat until-fail:3 passes 13 of 13, including the new guest_http2_http1_cookies. With Transport.cpp from the previous head 760eba6585 and the tests kept, guest_http2_http1_cookies fails at HTTP1 exactly one cookie header. check_conventions.py --base upstream/main passes on the committed head. Results: comment.

Ball X Pit (PPSA31872 01.301.000), RX 9070 XT, two runs each:

  • main 62b3ba2522: stops 6 and 10 s in with sceHttp2SetCookieBox not implemented.
  • This PR's first commit on 62b3ba2522: passes sceHttp2SetCookieBox and stops 7 and 13 s in at sceHttp2SetRedirectCallback not implemented, which #11575 implements.
  • The first commit's library changes on 8ff4baf534 with #11611 (which contains #11575 and #11586) and #11134 merged, plus a local change of #11611's sceNetRecv/sceNetSend calls to sceNetRecvfrom/sceNetSendto so its library builds on Windows (and two diagnostic prints in its TLS path): both 300 s runs reach the in-game base screen (tutorial prompt), about 35 presents per second. The title's request goes to script.google.com (its translation download).

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: PPSA31872 #8966 (together with #11575, #11586, #11611 and #11134)
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5034970982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11950). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-10-27T13:46:51Z. --- ### What On `main`, `sceHttp2GetCookieBox` throws for every call, and since #10167 `sceHttp2SetCookieBox` throws for any nonzero box (the second negative control below). Ball X Pit (PPSA31872) binds a cookie box at start-up and stops about 10 s in with `sceHttp2SetCookieBox not implemented` (runs below). Before #10167 the call returned 0 and the title reached gameplay on `main` (#8966). This binds cookie boxes as an emulator run of firmware 13.42's `libSceHttp2.sprx` does: - `sceHttp2SetCookieBox(id, box)` accepts a template or a request and a live box or 0 (unbind). Contexts, unused ids and unknown, deleted or other-kind boxes return 0x817B1100. - A new request copies its template's box; older requests and requests created before an unbind keep theirs. Deleting a bound box returns 0 and the requests holding it still report it. - `sceHttp2GetCookieBox(id, int*)` returns 0x817B1225 for a null output (before checking the id), otherwise writes 0 and returns 0x817B1100 for an invalid id, 0x817B1025 when no box is bound, or 0 and the box id. It writes 4 bytes. A request with a bound box now sends the box's matching cookies in a `cookie` field and stores each `Set-Cookie` of the response in the box, using the store's existing matching and parsing (shared with `sceHttp2GetCookie` and `sceHttp2AddCookie`). That part is not measured: the run cannot reach the network, so it is recorded in the debt entry. The HTTP/1.x path of #11611 does the same. This part is JJenkx's work: their commit [a73753f129](https://github.com/JJenkx/AnyPS5/commit/a73753f129c9c02b6eee9781afa370975e9f3b7d) is `d6a8038853` here, with JJenkx as its author. B-Howell found the gap ([comment](https://github.com/boykopovar/AnyPS5/pull/11950#issuecomment-6582391534)) and tested JJenkx's commit on Windows and Linux ([report](https://github.com/boykopovar/AnyPS5/pull/11611#issuecomment-6585851057)). Thank you both. Box cookies are chosen by the request URL's scheme, sent together with any added with `sceHttp2AddRequestHeader` in one `Cookie` field as [RFC 6265 section 5.4](https://www.rfc-editor.org/rfc/rfc6265.html#section-5.4) describes, and each response `Set-Cookie` is stored in the box. Before it, an HTTP/1.x request on a template with a bound box sent and stored no cookies. This is not measured on a console either; the `libSceHttp2 cookie transport` debt entry records it. The transport reads and stores those cookies while it holds the request's state mutex, and deleting a request holds the handles mutex while it waits for that state mutex. To avoid that deadlock, the cookie module keeps its own record of live boxes (added by `sceHttp2CreateCookieBox`, removed by `sceHttp2DeleteCookieBox`), and a box lookup no longer takes the handles mutex. The third negative control below shows the delete hanging without it. ### Tested Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, `BUILD_TESTING=ON`, on `main` `2ee8e9751a`: - `guest_http2`, `guest_http2_cookies`, `guest_http2_options`, `guest_http2_transport`, `guest_http2_early_response`, `guest_http2_dns_first` and `guest_http2_teardown` pass, three runs each. `guest_http2` covers the binding cases above. Two new `guest_http2_transport` scenarios: one binds a box holding one cookie, checks that the loopback server receives it, and that the server's `Set-Cookie` lands in the box; in the other the server answers with 1500 `Set-Cookie` fields, and once the first is in the box another thread deletes the request, which must return within 2 s. `guest_http2_transport` alone also passes ten runs out of ten, 3.1 s each. - With `Transport.cpp`, `Cookies.cpp` and `Cookies.hpp` put back to `main`'s version and `Export.cpp` to this PR's first commit (tests kept), `guest_http2_transport` fails in all three runs at `box cookie sent`. With only `main`'s `sceHttp2SetCookieBox` body put back, `guest_http2` and `guest_http2_transport` fail in all three runs with `sceHttp2SetCookieBox not implemented`. With the library files of this PR's first commit, where a box lookup took the handles mutex (tests kept), the delete does not return in all three runs. - `tools/check_conventions.py --base upstream/main` passes. - Head `d6a8038853` (with JJenkx's HTTP/1.x commit), Windows 11, WinLibs GCC, Release: `ctest -R '^(guest_http2.*|public_headers)$' --repeat until-fail:3` passes 13 of 13, including the new `guest_http2_http1_cookies`. With `Transport.cpp` from the previous head `760eba6585` and the tests kept, `guest_http2_http1_cookies` fails at `HTTP1 exactly one cookie header`. `check_conventions.py --base upstream/main` passes on the committed head. Results: [comment](https://github.com/boykopovar/AnyPS5/pull/11950#issuecomment-6633515848). Ball X Pit (PPSA31872 01.301.000), RX 9070 XT, two runs each: - `main` `62b3ba2522`: stops 6 and 10 s in with `sceHttp2SetCookieBox not implemented`. - This PR's first commit on `62b3ba2522`: passes `sceHttp2SetCookieBox` and stops 7 and 13 s in at `sceHttp2SetRedirectCallback not implemented`, which #11575 implements. - The first commit's library changes on `8ff4baf534` with #11611 (which contains #11575 and #11586) and #11134 merged, plus a local change of #11611's `sceNetRecv`/`sceNetSend` calls to `sceNetRecvfrom`/`sceNetSendto` so its library builds on Windows (and two diagnostic prints in its TLS path): both 300 s runs reach the in-game base screen (tutorial prompt), about 35 presents per second. The title's request goes to `script.google.com` (its translation download). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA31872 #8966 (together with #11575, #11586, #11611 and #11134) - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
XairRrR commented 2026-10-29 04:09:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T04:09:27Z.

Review: APPROVED


Reviewed — approved

On Linux the change merges cleanly and builds, all guest_http2* tests pass in 5 of 5 runs, and three negative controls (the binding, the transport cookie path, and the lock-order fix) each make guest_http2_transport fail at the expected check.

What I ran

Head bbef95bb6827e55fd2abe6c9305bbf6da9f51c47 merged with --no-ff onto main b433c40f2f46aa2e59e19806010a839ac8572d64 (clean) in a clean worktree. Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, BUILD_TESTING=ON, Intel Core i9-14900KF.

git diff --check origin/main...refs/review/11950
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests libSceHttp2
cmake --build build -j10 --target libs
ctest --test-dir build -R '^guest_http2' -j4 --output-on-failure --repeat until-fail:3
ctest --test-dir build -R '^guest_http2' -j4 --output-on-failure --repeat until-fail:5

# negative controls (tests kept, rebuild guest_http2_transport_tests, then run)
git checkout origin/main -- core/libs/prx/libSceHttp2/{Cookies.cpp,Cookies.hpp,Export.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp}
git checkout origin/main -- core/libs/prx/libSceHttp2/Transport.cpp
git checkout 96603d9851 -- core/libs/prx/libSceHttp2/{Cookies.cpp,Cookies.hpp,Export.cpp}
ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure

Results

Check Result
Merge onto main Clean
git diff --check Clean
tools/check_conventions.py --base origin/main All conventions checks passed.
Build of the Http2 test targets and libSceHttp2 OK
Build of --target libs OK, no warnings
guest_http2, guest_http2_cookies, guest_http2_options, guest_http2_transport, guest_http2_early_response, guest_http2_system_roots, guest_http2_teardown Pass, 3 of 3 and then 5 of 5 runs
guest_http2_transport duration 5.6 s per run (30 s limit)
ctest, merged tree, 5 repeats
100% tests passed out of 7

Total Test time (real) =  28.29 sec

guest_http2_dns_first is only registered on Windows, so it did not run here.

Negative control

All three controls keep the PR's tests and change only library files:

  1. All six libSceHttp2 sources from main. guest_http2_tests does not compile (too many arguments to function 'int sceHttp2GetCookieBox()'), as B-Howell reported. guest_http2_transport_tests does compile, and fails in the new scenario at HTTP2 cookie box scenario / what(): sceHttp2SetCookieBox not implemented.
  2. Only Transport.cpp from main. Fails at HTTP2: box cookie sent, so the test covers the request-side cookie field.
  3. Cookies.cpp, Cookies.hpp and Export.cpp from the first commit 96603d9851, where FindBox still went through Http2CookieBoxExists and g_handlesMutex. Fails at HTTP2: delete returns while the transport stores response cookies. This confirms the lock-order inversion that oneandonlydean reported and shows the new CookieBoxDelete scenario catches it on this host. With the head's files restored, the scenario passes in every run above.

Findings

Blocking

None.

Non-blocking

None.

Notes from reading the code:

  • Lock order after the fix: the transport takes g_cookiesMutex while it holds the request state mutex (Transport.cpp L413, L490). The delete paths hold g_handlesMutex and wait for the state mutex. No path now takes another lock while it holds g_cookiesMutex: FindBox only reads g_cookieBoxes. sceHttp2CreateCookieBox and sceHttp2DeleteCookieBox call Http2AddCookieBox and Http2ForgetCookies outside the handles lock (Export.cpp L348-L374). The resulting order (handles, then state, then cookies) has no cycle.
  • Address() builds https:// + authority + path, and the path includes the query. The cookie module's ParseUrl drops ?/# and the port, so default paths and domain matching use the bare host and path.
  • A request takes the box id from its template when it is created, and Update throws once a transport exists. So the box the transport sees cannot change during a send. A box deleted while a request still holds its id is no longer in g_cookieBoxes, and handle ids are never reused, so that request sends and stores nothing.

Not verified

  • The firmware 13.42 results (error codes, null-output order, copy-on-create, deleted box still reported) come from the author's emulator run. I checked only that the code and guest_http2 match the description.
  • Sending and storing cookies over a real network, and the Ball X Pit (PPSA31872) result. No title was run.
  • Windows, macOS, and a lock-order checker such as TSan.
  • The coordination with the overlapping Http2 PRs (#12305 and the others in the overlap report). This PR merges cleanly onto current main.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5692749847 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11950#pullrequestreview-5692749847). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T04:09:27Z. **Review:** APPROVED --- # Reviewed — approved On Linux the change merges cleanly and builds, all `guest_http2*` tests pass in 5 of 5 runs, and three negative controls (the binding, the transport cookie path, and the lock-order fix) each make `guest_http2_transport` fail at the expected check. ## What I ran Head `bbef95bb6827e55fd2abe6c9305bbf6da9f51c47` merged with `--no-ff` onto `main` `b433c40f2f46aa2e59e19806010a839ac8572d64` (clean) in a clean worktree. Arch Linux 7.2.11-zen, GCC 16.2.1, Release, Ninja, `BUILD_TESTING=ON`, Intel Core i9-14900KF. ```sh git diff --check origin/main...refs/review/11950 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target guest_http2_tests guest_http2_cookie_tests guest_http2_options_tests guest_http2_transport_tests guest_http2_teardown_tests libSceHttp2 cmake --build build -j10 --target libs ctest --test-dir build -R '^guest_http2' -j4 --output-on-failure --repeat until-fail:3 ctest --test-dir build -R '^guest_http2' -j4 --output-on-failure --repeat until-fail:5 # negative controls (tests kept, rebuild guest_http2_transport_tests, then run) git checkout origin/main -- core/libs/prx/libSceHttp2/{Cookies.cpp,Cookies.hpp,Export.cpp,Transport.cpp,Transport.hpp,include/Http2.hpp} git checkout origin/main -- core/libs/prx/libSceHttp2/Transport.cpp git checkout 96603d9851 -- core/libs/prx/libSceHttp2/{Cookies.cpp,Cookies.hpp,Export.cpp} ctest --test-dir build -R '^guest_http2_transport$' --output-on-failure ``` ## Results | Check | Result | |---|---| | Merge onto `main` | Clean | | `git diff --check` | Clean | | `tools/check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build of the Http2 test targets and `libSceHttp2` | OK | | Build of `--target libs` | OK, no warnings | | `guest_http2`, `guest_http2_cookies`, `guest_http2_options`, `guest_http2_transport`, `guest_http2_early_response`, `guest_http2_system_roots`, `guest_http2_teardown` | Pass, 3 of 3 and then 5 of 5 runs | | `guest_http2_transport` duration | 5.6 s per run (30 s limit) | <details><summary>ctest, merged tree, 5 repeats</summary> ``` 100% tests passed out of 7 Total Test time (real) = 28.29 sec ``` </details> `guest_http2_dns_first` is only registered on Windows, so it did not run here. ## Negative control All three controls keep the PR's tests and change only library files: 1. **All six `libSceHttp2` sources from `main`.** `guest_http2_tests` does not compile (`too many arguments to function 'int sceHttp2GetCookieBox()'`), as B-Howell reported. `guest_http2_transport_tests` does compile, and fails in the new scenario at `HTTP2 cookie box scenario` / `what(): sceHttp2SetCookieBox not implemented`. 2. **Only `Transport.cpp` from `main`.** Fails at `HTTP2: box cookie sent`, so the test covers the request-side `cookie` field. 3. **`Cookies.cpp`, `Cookies.hpp` and `Export.cpp` from the first commit `96603d9851`,** where `FindBox` still went through `Http2CookieBoxExists` and `g_handlesMutex`. Fails at `HTTP2: delete returns while the transport stores response cookies`. This confirms the lock-order inversion that oneandonlydean reported and shows the new `CookieBoxDelete` scenario catches it on this host. With the head's files restored, the scenario passes in every run above. ## Findings ### Blocking None. ### Non-blocking None. Notes from reading the code: - Lock order after the fix: the transport takes `g_cookiesMutex` while it holds the request state mutex ([Transport.cpp L413](https://github.com/boykopovar/AnyPS5/blob/bbef95bb6827e55fd2abe6c9305bbf6da9f51c47/core/libs/prx/libSceHttp2/Transport.cpp#L413-L413), [L490](https://github.com/boykopovar/AnyPS5/blob/bbef95bb6827e55fd2abe6c9305bbf6da9f51c47/core/libs/prx/libSceHttp2/Transport.cpp#L490-L490)). The delete paths hold `g_handlesMutex` and wait for the state mutex. No path now takes another lock while it holds `g_cookiesMutex`: [`FindBox`](https://github.com/boykopovar/AnyPS5/blob/bbef95bb6827e55fd2abe6c9305bbf6da9f51c47/core/libs/prx/libSceHttp2/Cookies.cpp#L323-L326) only reads `g_cookieBoxes`. `sceHttp2CreateCookieBox` and `sceHttp2DeleteCookieBox` call `Http2AddCookieBox` and `Http2ForgetCookies` outside the handles lock ([Export.cpp L348-L374](https://github.com/boykopovar/AnyPS5/blob/bbef95bb6827e55fd2abe6c9305bbf6da9f51c47/core/libs/prx/libSceHttp2/Export.cpp#L348-L374)). The resulting order (handles, then state, then cookies) has no cycle. - `Address()` builds `https://` + authority + path, and the path includes the query. The cookie module's `ParseUrl` drops `?`/`#` and the port, so default paths and domain matching use the bare host and path. - A request takes the box id from its template when it is created, and `Update` throws once a transport exists. So the box the transport sees cannot change during a send. A box deleted while a request still holds its id is no longer in `g_cookieBoxes`, and handle ids are never reused, so that request sends and stores nothing. ## Not verified - The firmware 13.42 results (error codes, null-output order, copy-on-create, deleted box still reported) come from the author's emulator run. I checked only that the code and `guest_http2` match the description. - Sending and storing cookies over a real network, and the Ball X Pit (PPSA31872) result. No title was run. - Windows, macOS, and a lock-order checker such as TSan. - The coordination with the overlapping Http2 PRs (#12305 and the others in the overlap report). This PR merges cleanly onto current `main`.
XairRrR commented 2026-11-02 20:15:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T20:15:59Z.

Review: APPROVED


Re-checked — approved

Since my last review the branch only gained merges of main (77c3d1d379, 8a5f9e2706, cbbf248943). The two feature commits did not change. The merged tree passes the checks and the focused tests, and the negative control still fails where it should.

What changed since my last review

  • delta.patch shows that 96603d9851 and bbef95bb68 are unchanged. The new commits are three merges of main. In those merges the author resolved conflicts in Transport.cpp (the Cookies.hpp include and the set-cookie line next to content-encoding) and in GuestHttp2Transport.cpp (the Mode enum).
  • main now follows redirects (guest_http2_redirects). The cookie code works with it: Address() is rebuilt from state->url, which is replaced for each hop (Transport.cpp L748-L760). So each hop sends the box's cookies for its own URL (L619-L621), and stores the redirect response's Set-Cookie under the URL that answered (L536). The PR's tests do not combine a bound box with a redirect.
  • Since then, others posted reports on titles (Peace Walker, MOUSE: P.I. For Hire, Snoopy) and on the HTTP/1 path; see below. The description is unchanged in substance.

What I ran

Head cbbf2489436ffbd22510b4a8a763a141cb3b3779 merged with --no-ff onto main 096c45570f516de76a43bbe1b97781381c84f55f (merged tree 8cc1d94dce13aaa0fefd2d7280f0d9fb33ba9674) in a clean worktree. Debian 13 VM (32 vCPU, Xeon Gold 6136), GCC 14.2.0, Release, Ninja, BUILD_TESTING=ON.

git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...cbbf2489436ffbd22510b4a8a763a141cb3b3779
python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f
ctest --test-dir build -R "^guest_http2" -j8 --test-load 32 --output-on-failure --repeat until-fail:3
# negative control
git show 096c45570f:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build guest_http2_transport_tests
ctest --test-dir build -R "^guest_http2_transport$" --output-on-failure
git show 8cc1d94dce:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp
ninja -C build guest_http2_transport_tests
ctest --test-dir build -R "^guest_http2_transport$"
git status --porcelain
Check Result
git diff --check Clean
check_conventions.py All conventions checks passed.
Script build, libs, selected tests (793) Pass. No new failures or timeouts. unwrap_self also fails on main. Two main_sync_renames_* tests fail on the baseline and now pass; they are unrelated to this PR.
guest_http2, _cookies, _options, _transport, _early_response, _system_roots, _redirects, _teardown Pass, 3 of 3 runs. guest_http2_transport takes about 8 s and guest_http2_redirects about 13 s, both under the 30 s limit.
Negative control (Transport.cpp from main) Fails at HTTP2: box cookie sent, as expected.
Restored merged tree guest_http2_transport passes, and git status --porcelain is empty.

Previous findings

My previous review had no blocking or non-blocking findings.

  • B-Howell's comment on the HTTP/1 path does not apply to this PR as it stands. main has no HTTP/1 transport in libSceHttp2/Transport.cpp, so this PR has no HTTP/1 path to cover yet. The gap would appear when this PR and #11611 are both merged. As B-Howell suggested, whichever of the two lands second should carry the bound box into SendHttp1. JJenkx's follow-up commit is aimed at that case. I did not review that commit.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • The firmware 13.42 behaviour and the error codes come from the author's emulator run and are author-reported.
  • Cookies sent and stored over a real network. The title reports in the discussion are author- and tester-reported; I ran no title.
  • A bound box combined with a redirect. I checked this by reading the code; no test covers it.
  • Windows and macOS, and a lock-order checker such as TSan.
  • The validation-layer comparison did not run, because the PR changes no file under the AGC driver, the shader recompiler or VideoOut.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742732952 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11950#pullrequestreview-5742732952). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T20:15:59Z. **Review:** APPROVED --- # Re-checked — approved Since my last review the branch only gained merges of `main` (`77c3d1d379`, `8a5f9e2706`, `cbbf248943`). The two feature commits did not change. The merged tree passes the checks and the focused tests, and the negative control still fails where it should. ## What changed since my last review - delta.patch shows that `96603d9851` and `bbef95bb68` are unchanged. The new commits are three merges of `main`. In those merges the author resolved conflicts in `Transport.cpp` (the `Cookies.hpp` include and the `set-cookie` line next to `content-encoding`) and in `GuestHttp2Transport.cpp` (the `Mode` enum). - `main` now follows redirects (`guest_http2_redirects`). The cookie code works with it: `Address()` is rebuilt from `state->url`, which is replaced for each hop ([Transport.cpp L748-L760](https://github.com/boykopovar/AnyPS5/blob/cbbf2489436ffbd22510b4a8a763a141cb3b3779/core/libs/prx/libSceHttp2/Transport.cpp#L748-L760)). So each hop sends the box's cookies for its own URL ([L619-L621](https://github.com/boykopovar/AnyPS5/blob/cbbf2489436ffbd22510b4a8a763a141cb3b3779/core/libs/prx/libSceHttp2/Transport.cpp#L619-L621)), and stores the redirect response's `Set-Cookie` under the URL that answered ([L536](https://github.com/boykopovar/AnyPS5/blob/cbbf2489436ffbd22510b4a8a763a141cb3b3779/core/libs/prx/libSceHttp2/Transport.cpp#L536-L536)). The PR's tests do not combine a bound box with a redirect. - Since then, others posted reports on titles (Peace Walker, MOUSE: P.I. For Hire, Snoopy) and on the HTTP/1 path; see below. The description is unchanged in substance. ## What I ran Head `cbbf2489436ffbd22510b4a8a763a141cb3b3779` merged with `--no-ff` onto `main` `096c45570f516de76a43bbe1b97781381c84f55f` (merged tree `8cc1d94dce13aaa0fefd2d7280f0d9fb33ba9674`) in a clean worktree. Debian 13 VM (32 vCPU, Xeon Gold 6136), GCC 14.2.0, Release, Ninja, `BUILD_TESTING=ON`. ```sh git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...cbbf2489436ffbd22510b4a8a763a141cb3b3779 python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f ctest --test-dir build -R "^guest_http2" -j8 --test-load 32 --output-on-failure --repeat until-fail:3 # negative control git show 096c45570f:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build guest_http2_transport_tests ctest --test-dir build -R "^guest_http2_transport$" --output-on-failure git show 8cc1d94dce:core/libs/prx/libSceHttp2/Transport.cpp > core/libs/prx/libSceHttp2/Transport.cpp ninja -C build guest_http2_transport_tests ctest --test-dir build -R "^guest_http2_transport$" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | Clean | | `check_conventions.py` | `All conventions checks passed.` | | Script build, `libs`, selected tests (793) | Pass. No new failures or timeouts. `unwrap_self` also fails on `main`. Two `main_sync_renames_*` tests fail on the baseline and now pass; they are unrelated to this PR. | | `guest_http2`, `_cookies`, `_options`, `_transport`, `_early_response`, `_system_roots`, `_redirects`, `_teardown` | Pass, 3 of 3 runs. `guest_http2_transport` takes about 8 s and `guest_http2_redirects` about 13 s, both under the 30 s limit. | | Negative control (`Transport.cpp` from `main`) | Fails at `HTTP2: box cookie sent`, as expected. | | Restored merged tree | `guest_http2_transport` passes, and `git status --porcelain` is empty. | ## Previous findings My previous review had no blocking or non-blocking findings. - B-Howell's comment on the HTTP/1 path does not apply to this PR as it stands. `main` has no HTTP/1 transport in `libSceHttp2/Transport.cpp`, so this PR has no HTTP/1 path to cover yet. The gap would appear when this PR and #11611 are both merged. As B-Howell suggested, whichever of the two lands second should carry the bound box into `SendHttp1`. JJenkx's follow-up commit is aimed at that case. I did not review that commit. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - The firmware 13.42 behaviour and the error codes come from the author's emulator run and are author-reported. - Cookies sent and stored over a real network. The title reports in the discussion are author- and tester-reported; I ran no title. - A bound box combined with a redirect. I checked this by reading the code; no test covers it. - Windows and macOS, and a lock-order checker such as TSan. - The validation-layer comparison did not run, because the PR changes no file under the AGC driver, the shader recompiler or VideoOut. <!-- anyps5-bots job=1901 head=cbbf2489436ffbd22510b4a8a763a141cb3b3779 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11950
No description provided.