feat(libSceHttp): implement the cookie limit setters #8620

Closed
Tanmay-codeol wants to merge 1 commit from upstream-pr/8620 into main
Tanmay-codeol commented 2026-10-20 18:40:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Tanmay-codeol on 2026-10-20T18:40:39Z.


What

Implements sceHttpSetCookieMaxNum, sceHttpSetCookieMaxNumPerDomain, sceHttpSetCookieMaxSize and sceHttpSetCookieTotalMaxSize, which were throwing stubs.

  • Signatures (int libhttpCtxId, uint32_t value) follow the Orbital type database.
  • The value is discarded because the offline backend stores no cookies. A context that is not initialized returns 0x80431001 and an unknown one 0x80431100, as sceHttpCookieFlush does.
  • sceHttpAddCookie, sceHttpGetCookie, sceHttpCookieExport and sceHttpCookieImport still throw.
  • Limit ranges, defaults and out-of-range errors are not measured. They are recorded under Silent stubs in docs/dev/debt/libSceHttp.md.

Tested

Windows 11, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON:

  • guest_http and guest_http_response_header pass. The cache flush test now covers the four setters before init, with unknown ids and with live contexts, using 0 and UINT32_MAX.
  • Removing the context check from one setter makes guest_http fail.
  • tools/check_conventions.py --base origin/main passes.

No console or title was used.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4940614538 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8620). Originally posted by [Tanmay-codeol](https://github.com/Tanmay-codeol) on 2026-10-20T18:40:39Z. --- ### What Implements `sceHttpSetCookieMaxNum`, `sceHttpSetCookieMaxNumPerDomain`, `sceHttpSetCookieMaxSize` and `sceHttpSetCookieTotalMaxSize`, which were throwing stubs. - Signatures `(int libhttpCtxId, uint32_t value)` follow the [Orbital type database](https://github.com/AlexAltea/orbital/blob/b321fcdbd700cc02da1cb1ad25412781d5ec73c6/tools/ida/db_types.json). - The value is discarded because the offline backend stores no cookies. A context that is not initialized returns `0x80431001` and an unknown one `0x80431100`, as `sceHttpCookieFlush` does. - `sceHttpAddCookie`, `sceHttpGetCookie`, `sceHttpCookieExport` and `sceHttpCookieImport` still throw. - Limit ranges, defaults and out-of-range errors are not measured. They are recorded under Silent stubs in `docs/dev/debt/libSceHttp.md`. ### Tested Windows 11, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`: - `guest_http` and `guest_http_response_header` pass. The cache flush test now covers the four setters before init, with unknown ids and with live contexts, using 0 and `UINT32_MAX`. - Removing the context check from one setter makes `guest_http` fail. - `tools/check_conventions.py --base origin/main` passes. No console or title was used. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
oneandonlydean commented 2026-10-20 23:22:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T23:22:47Z.


@Tanmay-codeol Thanks. The context checks follow sceHttpCookieFlush exactly, the test covers before-init, unknown and live ids, and the debt entry is clear about what's assumed.

One question before this can go in. CONTRIBUTING.md allows a silent stub "only when it unblocks a title and only affects the UI", and the debt entry lists these four under Silent stubs. The PR doesn't name a title that calls them. Which title or homebrew reaches one of these setters and stops on the throw today? A title ID and the call it makes (for example, "sets max cookie size right after sceHttpInit") is enough. Without one, the throwing stub on main is the behaviour the project wants, because it shows us the first title that needs the call.

If you have one, the bar is a full CI run with guest_http and guest_http_response_header passing on Linux and Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304028580 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8620#issuecomment-6304028580). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T23:22:47Z. --- @Tanmay-codeol Thanks. The context checks follow `sceHttpCookieFlush` exactly, the test covers before-init, unknown and live ids, and the debt entry is clear about what's assumed. One question before this can go in. CONTRIBUTING.md allows a silent stub "only when it unblocks a title and only affects the UI", and the debt entry lists these four under Silent stubs. The PR doesn't name a title that calls them. Which title or homebrew reaches one of these setters and stops on the throw today? A title ID and the call it makes (for example, "sets max cookie size right after `sceHttpInit`") is enough. Without one, the throwing stub on `main` is the behaviour the project wants, because it shows us the first title that needs the call. If you have one, the bar is a full CI run with `guest_http` and `guest_http_response_header` passing on Linux and Windows.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8620
No description provided.