feat(http): add opt-in Windows HTTP and HTTPS transport #3994
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3994"
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 aadi-varc on 2026-10-11T20:51:07Z.
What
Blocked by upstream policy; preserved for forks. Upstream explicitly decided that a host-backed
libSceHttpis not wanted onmain, and closed #3844 as not planned (decision). This PR remains open pending the author’s decision to withdraw it; it is not ready for upstream acceptance under the stated policy. The complete, rebased feature remains available on aadi-varc/AnyPS5:codex/http-winhttp-fork-only.The fork adds an experimental Windows WinHTTP transport enabled with
APS5_HTTP_NETWORK=1. The default remains offline, andlibSceHttp2remains offline. This is a Windows fork feature; it does not change upstream’s offline policy.Exports dispatch to separate offline and network implementations. The offline implementation retains current main's epoll waits, context teardown and CA-list behavior. Four commits separate handle/state management, WinHTTP transport, export dispatch, and tests/documentation.
The backend supports binary blocking requests, response headers/status/length, chunked responses, optional GZIP decoding, redirects, timeouts, concurrent independent requests and cancellation. Automatic redirects with Authorization, Proxy-Authorization or Cookie headers throw before sending. Deleting a parent invalidates and cancels descendants.
HTTPS uses Windows trust and certificate checks. Certificate-loading/CA-list APIs, epoll, enabled nonblocking operations, nonnull request-status callbacks, proxy/authentication/cookie support, explicit TLS versions and chunked uploads throw when requested.
USAGE.mdwarns that custom-certificate initialization can stop a title before its first request. Console semantics and remaining gaps are recorded indocs/dev/debt/libSceHttp.md.No third-party code is added. The localhost integration test generates disposable credentials with OpenSSL. Missing Python or OpenSSL reports CTest skip code 77; certificate-generation errors, timeouts and guest failures remain failures. These changes address the four implementation/reviewability points in the draft feedback.
Tested
Windows 10.0.26300 x86-64, WinLibs GCC 15.2.0 r7, Release, Python 3.12.14. Current head:
2636a48, rebased onto main3864da595.core/libs/CMakeLists.txtconflict by preserving upstream’snid_shared_stringstest and the HTTP offline test’s explicit environment. Documented the fork-only policy inUSAGE.md.guest_offline_imports,guest_http,guest_http_response_headerandguest_http_networkall passed withAPS5_HTTP_NETWORK=1in the parent shell (2.67 seconds total), including real HTTP/HTTPS loopback requests. Conventions, whitespace and test-registration checks passed.b889391, which passed the full Windows project build and five relevant tests, includingpatched_libraries(8.31 seconds total). The full project build was not repeated for the subsequent rebases and test-environment/documentation changes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in libSceHttp technical debt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-11T22:03:24Z.
Some design feedback, since the draft asks for it:
APS5_HTTP_NETWORK, and the offline branch keeps its(void)xlines after an early return in about 40 functions. A dispatch table, or moving the offline bodies into the sameHttpNetworknamespace, would keepExport.cppreadable.sceHttpsLoadCert,sceHttpCreateEpoll,sceHttpSetNonblockand a non-nullsceHttpSetRequestStatusCallbackalways throw. Many titles callsceHttpsLoadCertduring init, so in practice the opt-in will abort most HTTPS titles before their first request. That follows the throw rule, but it's worth stating in USAGE.md so people know what to expect.guest_http_networkneeds Python plus an OpenSSL found next to Git for Windows. Please have it report a skip (SKIP_RETURN_CODE) rather than fail when either is missing, because CI images may have neither.I haven't run it yet. I'm on Windows, so I can test the WinHTTP path once it's out of draft if that helps.
AI-assisted: yes. Written with AI assistance (Claude Code); I reviewed it.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T20:47:37Z.
Progress report (
d539606→ 5d23525)📈 System libraries: 86.39% (+0.03%, +1 implemented functions)
✅ 1 implemented
sceHttpSetCookieEnabledImported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-13T00:38:26Z.
A real-world case for this transport beyond
libSceHttp: OliSe Player (PPSA01153, open source, Marice/OliSePlayer) downloads every tune throughlibSceHttp2(sceHttp2CreateRequestWithURL,sceHttp2SendRequest,sceHttp2GetStatusCode,sceHttp2ReadData, blocking, plainhttp://URLs from modarchive.org and modland.com). On Linux withmainit runs and renders, butsceHttp2SendRequestreturns the offline error, so it logsradio: DOWNLOAD FAILED (-2)and plays nothing.Would a Linux implementation of
ITransport, and routinglibSceHttp2blocking requests through the same transport, be welcome as follow-ups once this lands? I can test both with OliSe on Linux (CachyOS, RTX 2070).AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-13T16:10:51Z.
Since #3844 was closed with "a host-backed
libSceHttpis not wanted on main", could you confirm the direction for a Linux/macOS transport, given this PR is Windows-only?I'd like to add the POSIX side and can build on the
Transport.hpp/Network.hppsplit introduced here, keeping the same opt-in model (default offline,APS5_HTTP_NETWORK=1). Three questions:mainat all, or should online HTTP stay fork-only?Happy to wait until #3994 settles before writing anything.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T11:13:22Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/user/USAGE.mdL84docs/dev/debt/libSceHttp.mdL20Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
docs/dev/BUILD.mddocs/dev/BUILD.mddocs/user/USAGE.mdcore/libs/CMakeLists.txtdocs/dev/BUILD.mddocs/user/USAGE.mddocs/user/USAGE.mddocs/user/USAGE.mdcore/libs/CMakeLists.txtcore/libs/prx/libSceHttp/CMakeLists.txtcore/libs/CMakeLists.txtcore/libs/prx/libSceHttp/Export.cppdocs/dev/debt/libSceHttp.mddocs/dev/BUILD.mdImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T00:03:19Z.
Closing: #3844 is closed as not planned, since a host-backed libSceHttp isn't wanted on main and forks can adapt the online libraries, and this PR implements that transport. A fork is the right home for it.
Pull request closed