fix(libSceHttp2): accept whitespace before chunk extensions #18378
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18378"
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 Ondra97 on 2026-11-11T12:59:53Z.
What
An HTTP/1.1 response read through libSceHttp2 fails when a chunk size is followed by a space or tab before an extension delimiter, such as
8 ;test=yes. The complete prefix is passed to the strict numeric decoder, sosceHttp2ReadDatathrows instead of delivering a valid response.Remove trailing SP and HTAB from the numeric prefix when a semicolon is present, then use the existing size decoder. This follows the BWS positions in RFC 9112 section 7.1.1. Other numeric parsing remains unchanged.
Tested
Windows 11 Pro 10.0.26300, AMD Ryzen 9 7900X, 32 GiB RAM, NVIDIA RTX 4070 Ti SUPER present but not exercised; WinLibs GCC 15.2.0 UCRT POSIX SEH r7, Release, full build configuration with
BUILD_TESTING=ON.Base:
2ecc68bda2642fbd5b4c9fb799bc1da4aa3df191. Tested head:e717e8630ec3d1cdbd722d1423e96e11a49f32db.The regression uses the existing TLS loopback server and public HTTP2 calls, reads the exact response body and consumes EOF. It applies SP, HTAB and mixed SP/HTAB before an extension on the first data chunk, second data chunk and terminating zero chunk.
On unchanged base code, every added case threw
sceHttp2: invalid number; the regression failed. With the fix, all nine cases and the existing HTTP/1 controls, malformed-response checks and cancellation checks passed.Three CTests passed, none skipped. Runtime modules were refreshed with the existing copy helper before testing; the staged HTTP2 module's hash matched the rebuilt module. Conventions passed. The overlap check found no overlap with the open PRs, including the five related HTTP2 patches. No title, Linux runtime or full repository test suite was run.
The hosted Windows job passed on this head merged into main
1e8dfd6: 11 CTests passed, none skipped, includingguest_http2_http1.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 PrivacyOnion on 2026-11-11T14:57:27Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
e717e8630e:tools/check_conventions.pypassed;git diff --checkclean.guest_http2_transport_testsbuilt cleanly.guest_http2_gzip_members,guest_http2_gzip_headers,guest_http2_transport,guest_http2_early_response,guest_http2_system_roots,guest_http2_http1,guest_http2_http1_cookies,guest_http2_ssl_callbacks,guest_http2_redirects,guest_http2_auth_status):core/libs/prx/libSceHttp2/Transport.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me