feat(http2): deliver redirect callbacks and follow HTTPS redirects #11575
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11575"
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-26T20:55:16Z.
What
Hamster Playground now stops during valid, non-null redirect callback registration on current main. Store callbacks and their user arguments in template/request settings, inherit them when creating requests, and deliver them for actual redirect responses. Nonzero refusal retains the received status/body; zero follows the redirect, with the callback able to change the proposed method.
Implement up to six HTTPS redirects with relative-reference resolution, 301/302 POST and 303 method/body rewriting, 307/308 upload preservation, cross-origin header handling, and the original overall deadline. Callback request deletion cancels without deadlocking. Invalid methods and unknown error mappings remain explicit failures, documented in debt. The transport and compression limitations remain scoped in the debt entry. The callback contract follows public SharpProspero bindings; delivery details have not been measured on a console.
Final local overlap run reports this PR's own export as its only confirmed match. The adjacent additions previously conflicting with #10536 now merge independently: callback settings, typed declaration and Windows test environment are placed separately. Manually reviewed remaining uncompared #9598 (teardown), #11145 (proxy/Winsock/roots) and #11470 (WebSockets); none implements redirect callback delivery/following. No implementation dependency on them.
Tested
Reviewer-requested test cleanup: public head
eeea4a5fbb4441e114137e053fdcde5682929a65removes only the RedirectFailures mode 4 downgrade-refusal scenario. The other four invalid callback cases and bounded-redirect check remain. Production refusal and its debt entry are unchanged. The updated head's five HTTP2 groups pass as recorded in the qualification reply. The original 37-scenario count below predates this removal and does not describe a retained downgrade assertion.Linux 7.2.9-arch1-1, Ryzen 9 7950X, GCC 16.2.1, Release. Main
e61a7c7e2433dfccab7917a68065882deee96aa5; changed847910c69dfebe95049d55fe79552f5f5b6087e.106a0bc133afdc8ee5edcc396eea52010663ed92adds the new tests and mechanical typed callback declaration/definition signatures to the earlier main7c3d8b3, retaining its implementation. Both new test groups fail withsceHttp2SetRedirectCallback not implemented.guest_http2,guest_http2_cookies,guest_http2_transport,guest_http2_early_response,guest_http2_redirects. The original suite had 37 loopback scenarios before that later test cleanup: callback inheritance/replacement/clearing/refusal, automatic/manual policy, all five redirect statuses, method overrides, HEAD, retained uploads, relative references and queries/fragments, same/new-origin headers, invalid methods, callback exceptions/deletion, unsupported downgrade and redirect limits. Actual TLS/nghttp2 responses are exchanged.3c3aa802246b58dbab7e07c90dcf06c5a4cbbff3adds existing #6782/#6913 graphics prerequisites; its HTTP/2 sources are identical to this PR. The original redirect-registration exception clears, then startup aborts on the separatesceHttp2SetSslCallbackgap. Gameplay is not restored yet. No FPS improvement is claimed. Four graphics/import fixtures pass before the native launch, which has one actual Khronos insertion and zero VUIDs. Both save paths/configs/kernel setting restore, no game process remains.Exact pins, patch, paired verbose logs, negative control and native outcome. SHA256:
fd5cb20a4fc98c4a690253c6cf10152bdef679d68ca8e273fb8ed33d924867e1. Public download hash-verified. No game assets, binaries, screenshots or shader captures included.Independent title report from ycbuzi: Ghost Song (PPSA09232), Windows 11 26200, Ryzen 9 7900 and RTX 4070 SUPER. With a single conversion from main
16954551edand onlylibSceHttp2.prxreplaced, main stopped at redirect registration;eeea4a5fbbadvanced to the SSL registration stop; adding #11586a40e7c1e81passed the publisher splash and was still running when stopped at 3.5 minutes. Shader-cache warmth differed, so this supports removal of the two stops, not a loading-speed or FPS-gain claim. The reporter did not trace actual redirect callback delivery.Qualification update — 2026-10-30, repeat 2
Integrated main
e471817c68d4e1b1e44b0ce369ed88bafe4ae8edate069fd23084324e692f8d17eb6d0540e9f4cc672, preserving the old public head and actual integration parente471817c68d4e1b1e44b0ce369ed88bafe4ae8ed.Production and test files equal the automatic parent merge; manual resolution affects debt only. Main's functions, new fixtures and gitlinks remain.
Focused Linux CPU: 24 passes (guest_http2, guest_http2_cookies, guest_http2_options, guest_http2_transport, guest_http2_early_response, guest_http2_system_roots, guest_http2_redirects, guest_http2_teardown), public_headers passed once, zero skips. MinGW syntax and conventions pass.
Windows source/runtime qualification is owned by the resumed Windows worker and is separate from these Linux results. No new native SDK/title/GPU/performance claim.
HTTP order remains #11575 → #11586 → #11611. Current-main TLS floors, default trust and resolver retry behavior are retained.
Evidence: immutable qualification receipts, SHA-256
0e170ba60a93a8b65f4dac8050f68833249b80b5ef519f05d38340700cedeb5b(download verified).The actual updated dependency stack was also qualified on Windows at child #11611
f62b3a8f8a5e06a8d1cb63953acaad6d851ba458: 11 focused groups repeated three times, 33 passes. This is integrated-child evidence; these parent heads were not separately executed on Windows.Evidence: immutable qualification receipts, SHA-256
e423c97373758bf59239e02c138b74f35f1a45488793bc92878a4c836f94a584(download verified).AI-assisted: yes (Codex).
Latest HTTP main integration — 2026-10-30
Current-main integration at
5f18e5abe7073219780d1beae13e0a0c90f95fe1uses previous public heade069fd23084324e692f8d17eb6d0540e9f4cc672and actual updated integration parent42d009f5f37c8f388b01fbfe38d2e704c792c46f. Tested main:42d009f5f37c8f388b01fbfe38d2e704c792c46f. HTTP order stays #11575 → #11586 → #11611.All production and test files equal the actual-parent automatic merge. Main's added HTTP import stub, SandboxCertificates code and fixture are retained exactly. Manual debt resolution keeps callback/redirect qualifications and the new unknown-import inventory, while removing a superseded explicit-only-roots paragraph contradicted by retained main system-trust behavior. TLS floors, system trust, resolver options/retries, deadlines, callbacks and prior removed unsupported-refusal assertions remain. No external private Host recipe is imported.
Linux HTTP groups: guest_http2, guest_http2_cookies, guest_http2_options, guest_http2_transport, guest_http2_early_response, guest_http2_system_roots, guest_http2_redirects, guest_http2_teardown. Each passed three repeats (24 HTTP executions). Public headers and conventions passed; zero skips. Raw production HTTP libraries/test executables and current nid_patcher built, and the exact production NID-patching command sequence passed. Export.cpp and Transport.cpp passed MinGW syntax. The unrelated whole libs target was not built.
Earlier Windows qualification at
f62b3a8f8a5e06a8d1cb63953acaad6d851ba458is historical and is not relabelled to this new head. This new receipt is Linux CPU/MinGW syntax only; no new Windows, console/nativeSDK, title, GPU or performance claim.Immutable latest-chain qualification, SHA-256
0ede1b63340754d7efff35e929a30f7d996f5660388718b477a0d5b78418f235(download verified). AI-assisted: yes (Codex).Current-main HTTP qualification — 2026-10-30, repeat 3
Integrated current main
d2863131efb0e41c116e4197841b6a3086ce087ainto6ae1f9381bc8feb9f91cd1af41bc07d8895ace81, retaining actual parentd2863131efb0e41c116e4197841b6a3086ce087aand prior public head5f18e5abe7073219780d1beae13e0a0c90f95fe1in history.Preserves main HTTP/2 gzip decoder and adds per-redirect gzip-state reset, with empty-gzip redirect to identity and gzip redirect to gzip controls.
Linux: 8 applicable HTTP groups repeated three times (24 passes), public_headers passed, zero skips. Actual raw production HTTP library build and production NID patch-command sequence passed. MinGW syntax checks passed for Export.cpp and Transport.cpp; conventions and whitespace checks passed. Main gzip decoder helpers/fixtures, security fixture blobs, unknown-import stub and gitlinks are preserved.
The final child also rejects both deliberate old-composition regressions (missing redirect reset; missing HTTP/1 gzip guard). Restoring each passes its matched group and reproduces the original raw module SHA256.
These are Linux CPU loopback and MinGW syntax results. Earlier Windows evidence remains pinned to its earlier exact head; no current-head Windows, native SDK/title, GPU, performance, or HTTP/1 gzip decoder claim. Existing dependency order remains #11575 → #11586 → #11611.
Immutable composition, source and test evidence, SHA-256
534ee96041318122c1399a60e80047b50c9dca17a87f2e91cce8564cf3196e1f(download verified). AI-assisted: yes (Codex).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)Independent title data point: milescoviello reports MXGP26/PPSA30839, version01.003.000, on main
74acfad65bplus #11616/#11617. Without this PR it stops atsceHttp2SetRedirectCallback; adding this exact PR head passes registration and reaches the separatesceHttp2SendRequestAsyncgap. This is a contributor-reported one-call startup advance, not local gameplay validation or an async implementation claim.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-26T22:59:33Z.
Review: APPROVED
Reviewed exact head
d847910c69dfebe95049d55fe79552f5f5b6087e; no actionable finding in the implementation and test diff. Callback settings are copied from template to request and can be changed before transport creation; callbacks run outside the request mutex, with cancellation checked on return. Redirect follow tests cover all five statuses, POST/HEAD rewriting, callback refusal/override/clear/inheritance, cross-origin sensitive headers, same-origin retention, relative URI normalization, fragment removal, redirect bounds, cancellation and callback exceptions. The implementation keeps the overall deadline across hops and closes each prior connection before reconnecting.I built and linked the exact-head
guest_http2_transport_teststarget successfully. My CTest attempt stopped before entering the cases because this host’s Xeon E5-1620 v2 lacks required Zen 2 features (AVX2/FMA/BMI). The author reports the five focused Linux HTTP/2 groups passing on a Ryzen 9 7950X, including 37 loopback redirect scenarios and a negative control; I have not independently rerun those scenarios. Hosted eligibility, conventions, labels and report checks pass; relinker/product jobs are skipped by path policy.