feat(libSceHttp): accept obsolete HTTP date formats #18317
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18317"
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-11T07:33:11Z.
What
The reusable HTTP source recognizes only IMF-fixdate values for its Last-Modified validator. Valid RFC 850 and asctime values therefore force an unconditional snapshot, and a range-only origin fails to open. Comparing raw strings also treats an equivalent timestamp in another format as a changed representation.
Normalize recognized Date and Last-Modified values to IMF-fixdate before duplicate-field checks, identity comparisons and If-Range generation. Reuse the existing calendar/weekday validation, retain the 60-second age requirement and ETag priority, and preserve the conservative snapshot policy for invalid or recent dates. RFC 850's two-digit year uses a single UTC receive-time sample per response and the 50-year future cutoff. These formats and the sender's preferred output format are specified in RFC 9110 section 5.6.7.
The loopback matrix covers legacy Date, Last-Modified and both fields; one-/two-digit asctime days; a prior-century date; equivalent-format full responses; omitted later validators; and changed timestamps. Invalid weekday/month/day/time/year forms and dates only 59 seconds apart still require a complete snapshot. A deterministic parser executable supplies fixed receive times to test exact 50-year boundaries, one-second rollover, century transitions and leap-second preservation.
The transformed-response prerequisite #18270 is merged into main: both its head
57452d7cc5c710e39044369c9d785b24a0be0885and mergec65eb462147181941a64eaf6179876e81ae8a118are ancestors of the integrated main. The normal merge commita004afb4acbd289853764e0860df9ce00cacf34bcombines original topicdb0322068e55da299b9bac4b26d3a655929c8984with main09ab49de964979031bf07e2a0b13a3e56664abc8. That newer main merged locally without conflict markers. The date parser and fixed-clock test are preserved; main's 203 and empty Content-Range behavior and tests are retained.Tested
Windows 11 Pro 26300; AMD Ryzen 9 7900X (24 logical CPUs), 31.66 GiB usable RAM, NVIDIA RTX 4070 Ti SUPER (not exercised). WinLibs MinGW-w64 GCC 15.2.0 r7, CMake 4.1.2, Ninja 1.13.2, Python 3.14.7. Release,
BUILD_TESTING=ON,ANYPS5_RELINKER_ONLY=OFF,ANYPS5_ENABLE_SPIRV_TOOLS=ON; a new isolated source/build, at most three compiler jobs.Tested head:
a004afb4acbd289853764e0860df9ce00cacf34b; integrated/tested main:09ab49de964979031bf07e2a0b13a3e56664abc8. The full runtime configuration, productionlibspackaging, relinker and selected executables built successfully.All 20 selected CTests passed, 0 failed, 0 skipped, with no internal skip messages. Each completed below 30 seconds (largest: public-header audit 19.70 s; suite wall time 31.26 s). The fixed-clock parser test passed 12/12 exact cutoff, century, weekday and leap-second cases. The ordinary client, transformed/203 client and patched-module client each passed 10/10 valid legacy-date cases and 10/10 conservative snapshot controls. The ordinary and patched-module clients additionally cover main's five accepted empty Content-Range forms and twelve rejected forms. All 411 patched libraries loaded; the public-header audit checked 411 libraries and 34,460 exports (audit only, not the separate header compile batches).
All seven staged PRX/DLL files were refreshed and SHA256-verified against this build or the supported compiler runtime. Staged/built
libSceHttp.prx:22d6c2214831a982d7b2e0cb341fb57ea8782619b2e16a4b68ff42ca1e07fb78. The official FFmpeg9ac4cfd195f1MinGW archive matched its published SHA256e4be9938b321da5f53e248d8ae947c984390e09d0f59fb6855644a972126e26b.Reproduction, with the supported compiler on PATH, from the source checkout and an independent
../build:Conventions, whitespace and fixture syntax passed. The isolated overlap scan fetched 1,722 open heads and probed 1,721 other PRs against main
8224d6bf8cc843ebb9456284cdb92cf419a5e004; it exited 2 for four uncomparable branches, so this is not a clean automatic overlap result. Manual shared-file comparisons verified #9834974dfd5adeacd42557add90af180f96d06742d88, #1113435c09d332f3e86b6846ba05a25f662e25e8b7de9, #142126b4941bfe250142672c12b48b7b6c706b9691452and #185158fe0288d404d9b92be0c5f64761ce9e983b8dbf9. The first two add separate Sony request/resolver transport registrations and have no shared host-client debt entry in their before/after trees. #14212 only inserts separators in this debt file; #18515 leaves the host-client entry unchanged. None adds this date parser or deterministic target. No additional ordering dependency was identified; a combined runtime stack with those branches was not tested.Before publication main had advanced to
070750a0d807ea081978c4af1143173143a959b4. Its 39 changed paths since the tested main do not intersect the HTTP/AvPlayer Ninja build inputs, shared libc/libkernel implementation, top-level CMake, cmake helpers or dependency pins. A merge-tree check remained clean; conventions and whitespace were rechecked against fresh origin/main. The tests above remain evidence for the explicitly named tested main, not a rebuilt newer main.No Linux, console/title, entire-suite or full hosted product Build run is claimed for this integration. The old approval and contributor tests cover the old head. The old review's negative control was a build/link failure, not a demonstrated behavioral red run. There is no new parser change or performance claim. Full hosted Build dispatch requires an upstream maintainer; my account has READ access.
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-11T16:27:16Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
db0322068e:tools/check_conventions.pypassed;git diff --checkclean.guest_http_client_tests,guest_http_dates_testsbuilt cleanly.guest_http_dates,guest_http_client,guest_http_client_203):core/libs/prx/libSceHttp/src/Client.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass.Looks Good To Me
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T16:43:56Z.
Review: COMMENTED
feat(libSceHttp): accept obsolete HTTP date formats — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
I read the diff for all six changed files and the head text of the three that matter most for the date logic:
core/libs/prx/libSceHttp/src/Client.cpp,core/libs/tests/AvPlayerHttpServer.pyandcore/libs/prx/libSceHttp/CMakeLists.txt. I tracedCanonicalDateby hand against the RFC 850 and asctime examples in the test tables. I did not build or run any test. The build and CTest results in the description are the author's, from their Windows machine.Results
core/libs/prx/libSceHttp/src/Client.cpp,core/libs/tests/AvPlayerHttpServer.py,core/libs/tests/GuestHttpClient.cpp,core/libs/tests/GuestHttpDates.cpp,core/libs/prx/libSceHttp/CMakeLists.txt,docs/dev/debt/libSceHttp.mdClient.cppCanonicalDate: the 50-year cutoff uses one receive-time sample per responseetag(Client.cpplines 481–483), so no date canonicalization is needed thereAvPlayerHttpServer.pyforwards--transformedto the client (line 391)Findings
Blocking
None.
Non-blocking
None.
Not verified
client203identity-request assertion (AvPlayerHttpServer.pyline 409) compares against the full set of identity names. I did not trace that every name is requested byCheckRepresentationsalone in the 203 pass. The author's run covers it.To get this to a good state
Nothing is required.