fix(libSceHttp): escape URI bytes independently of host locale #4963
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4963"
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 QRMOE on 2026-10-13T06:39:16Z.
What
Use the ASCII URI unreserved alphabet in
sceHttpUriEscape, independently of the host's character locale. Main usesstd::isalnum, so selectingGerman_Germany.1252makes it leave some bytes above 0x7f unescaped and report too small a required output size. For the byte stringcaf\xE9 \xC3\xA9, the required output iscaf%E9%20%C3%A9(16 bytes including NUL); main reports 12 bytes in that locale.The alphabet follows RFC 3986 section 2.3 and matches shadPS4's
sceHttpUriEscape. Console behavior has not been measured and is recorded in technical debt.Tested
Windows, MinGW GCC 15.2, Release,
BUILD_TESTING=ON, main baseea2bbefb2:URI escaping changed with the host locale: required 12.German_Germany.1252locale and restores the original character locale afterward. The all-byte checks also run on other platforms.guest_sce_net,guest_poll,guest_socket_read_write,guest_tcp,guest_socket_pair,guest_dup,guest_socket_eventsandguest_fstatfs). Avast's log records automatic sandboxing of the test programs. The local full-build limitation remains; local full-build success is not claimed.Review validation
Ready for maintainer review. Full Linux/Windows CI requires a maintainer's manual dispatch; marking this PR ready does not claim those jobs passed.
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 repositoryImported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-13T07:22:32Z.
Linux test (Arch, GCC 16.2.1, glibc, Release, LANG=en_US.UTF-8), this PR merged onto
main7e181fcc3together with #4963, #4953, #4946 and #4942 (no conflicts):guest_http,guest_http_response_headerandguest_http2pass. WithUri.cppput back tomain's version,guest_httpstill passes on Linux, so the locale dependence this fixes does not show up on this Linux host; the change is harmless there.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T08:41:04Z.
Windows test: head
669731323merged onto currentmainc2565f014(clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest with the filterguest_http: guest_http passed, guest_http_response_header passed, guest_http2 passed (3 test(s), 0 failed);python tools/check_conventions.py --base upstream/mainpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:35:12Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Imported from boykopovar/AnyPS5. Originally posted by QRMOE on 2026-10-15T07:46:07Z.
Understood. I’ll leave this closed and revisit it only with a title ID and a current-main log showing the failure. I’ll hold off on new PRs without a title needing the change while the queue is high.
Pull request closed