Files
AnyPS5/docs/dev/debt/libSceHttp.md
T

16 KiB

libSceHttp technical debt

Silent stubs

  • libSceHttp - no request reaches the network, so sceHttpSetResponseHeaderMaxSize has no response header to limit, sceHttpSetRecvBlockSize ((int id, u32 blockSize) as in shadPS4) no response body to read in blocks and sceHttpRedirectCacheFlush no redirect to forget; sceHttpsUnloadCert returns success like sceHttpsLoadCert, which keeps no certificate; sceHttpSetRedirectCallback and sceHttpSetCookieRecvCallback accept callbacks that are never called, sceHttpsSetSslVersion has no TLS connection to configure and sceHttpsGetSslError reports error 0 with detail 0; sceHttpSetAuthInfoCallback accepts a callback that is never called, as no server asks for authentication; sceHttpsGetCaList and sceHttpsFreeCaList report an empty CA list (certs null, certsNum 0) and return 0, as no CA store is kept, and a null list returns ERROR_INVALID_VALUE; unlike shadPS4 they do not check that http_ctx_id is a live context nor that the library is initialised, and sceHttpsFreeCaList also nulls certs, which shadPS4 leaves untouched. The signatures and the { void* certs; int certsNum; } layout follow shadPS4 (PS4), not confirmed on a PS5 title

Unknown function info

Functional

  • sceHttpUriParse, sceHttpUriBuild, sceHttpUriMerge - console behavior for non-ASCII scheme and hostname bytes remains unmeasured. ASCII character classification and scheme case folding follow RFC 3986 sections 3.1 and 3.2, independently of the host locale; parsing retains the existing C-locale rejection of those bytes.

  • sceHttpUriEscape escapes every byte except the ASCII unreserved set in RFC 3986 section 2.3, independently of the host locale. Console behaviour for non-ASCII input remains unmeasured.

  • sceHttpAuthCacheFlush, sceHttpCookieFlush (libSceHttp) - the context-id signatures follow SharpProspero, and the NIDs zzB0StvRab4 and seCvUt91WHY match shadPS4. The offline backend never stores authentication credentials or cookies, so flushing a live context succeeds with empty caches. Calls return BEFORE_INIT (0x80431001) when no context is alive and INVALID_ID (0x80431100) for an unknown, deleted or non-context handle, following the existing context lifecycle checks. These error codes and their precedence have not been measured on PS5 hardware; shadPS4 only stubs these calls. Network-backed caches remain unimplemented.

  • sceHttpAbortWaitRequest, sceHttpWaitRequest (libSceHttp) - the abort takes only the epoll handle, as in Orbital and SharpProspero; behaviour and error codes follow shadPS4 (PS4), not confirmed on a PS5 title or hardware. An abort stays set: every later wait on the handle, a poll included, returns SCE_HTTP_ERROR_ABORTED (0x80431080) until the handle is destroyed. A wait woken by sceHttpDestroyEpoll, or by the sceHttpTerm that ends the last context, returns 0 events. The epoll calls return BEFORE_INIT (0x80431001) while no sceHttpInit context is alive and INVALID_ID (0x80431100) for an unknown context or handle, and sceHttpTerm returns the same errors instead of succeeding for any id. Handles are pointers, so a stale handle whose address a newer epoll reuses is taken as that epoll