feat(libSceHttp): add sceHttpSetResponseHeaderMaxSize, sceHttpRedirectCacheFlush, sceHttpsUnloadCert

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Adrià Franch 2026-10-06 08:06:17 +02:00
parent 481c85e7c9
commit bc7fdff9e5
3 changed files with 24 additions and 0 deletions

View File

@ -172,6 +172,12 @@ int APS5_VABI sceHttpSetRecvTimeOut(int id, uint32_t usec) {
return 0;
}
int APS5_VABI sceHttpSetResponseHeaderMaxSize(int id, uint64_t header_size) {
(void)id;
(void)header_size;
return 0;
}
int APS5_VABI sceHttpSetRequestContentLength(int request_id, uint64_t content_length) {
(void)request_id;
(void)content_length;
@ -242,6 +248,11 @@ int APS5_VABI sceHttpReadData(int request_id, void* data, size_t size) {
return ERROR_NETWORK;
}
int APS5_VABI sceHttpRedirectCacheFlush(int http_ctx_id) {
(void)http_ctx_id;
return 0;
}
int APS5_VABI sceHttpSetChunkedTransferEnabled(int id, int enable) {
(void)id;
(void)enable;
@ -345,6 +356,11 @@ int APS5_VABI sceHttpsLoadCert(int http_ctx_id, int num, void* ca_list, void* ce
return 0;
}
int APS5_VABI sceHttpsUnloadCert(int http_ctx_id) {
(void)http_ctx_id;
return 0;
}
int APS5_VABI sceHttpGetLastErrno(int request_id, int* errno_out) {
(void)request_id;
if (errno_out == nullptr) {

View File

@ -18,6 +18,9 @@ int APS5_VABI sceHttpCreateRequest2(int, const char*, const char*, std::uint64_t
int APS5_VABI sceHttpsEnableOption(int, std::uint32_t);
int APS5_VABI sceHttpsLoadCert(int, int, void*, void*, void*);
int APS5_VABI sceHttpGetLastErrno(int, int*);
int APS5_VABI sceHttpSetResponseHeaderMaxSize(int, std::uint64_t);
int APS5_VABI sceHttpRedirectCacheFlush(int);
int APS5_VABI sceHttpsUnloadCert(int);
int APS5_VABI sceHttpParseStatusLine(const char*, std::size_t, std::int32_t*, std::int32_t*, std::int32_t*, const char**, std::size_t*);
}
@ -137,6 +140,9 @@ int main() {
Require(sceHttpSetInflateGZIPEnabled(1, -1) == invalidValue);
Require(sceHttpsEnableOption(1, 0) == 0);
Require(sceHttpsLoadCert(1, 0, nullptr, nullptr, nullptr) == 0);
Require(sceHttpsUnloadCert(1) == 0);
Require(sceHttpSetResponseHeaderMaxSize(1, 8192) == 0);
Require(sceHttpRedirectCacheFlush(1) == 0);
int httpErrno = -1;
Require(sceHttpGetLastErrno(1, &httpErrno) == 0);
Require(httpErrno == 0);

View File

@ -26,6 +26,7 @@ Throughout the project, every function at every stage either **does exactly what
- [libSceNpTrophy2](../../core/libs/prx/libSceNpTrophy2/src/GameInfo.cpp): `sceNpTrophy2RegisterUnlockCallback` accepts a callback that is never called, as no trophy is ever unlocked, and `sceNpTrophy2UnregisterUnlockCallback` only returns success.
- [sceAvPlayerSetTrickSpeed](../../core/libs/prx/libSceAvPlayer/src/Source.cpp) (libSceAvPlayer) with a negative speed runs the clock backwards but delivers no frames; when a forward speed is set again, playback resumes from the rewound time.
- [ulobjmgr](../../core/libs/prx/ulobjmgr/Export.cpp) registers no object: `_sceUlobjmgrRegisterObject` always hands out id 0 and `_sceUlobjmgrUnregisterObject` releases nothing, as shadPS4 does
- [libSceHttp](../../core/libs/prx/libSceHttp/Export.cpp) - no request reaches the network, so `sceHttpSetResponseHeaderMaxSize` has no response header to limit and `sceHttpRedirectCacheFlush` no redirect to forget; `sceHttpsUnloadCert` returns success like `sceHttpsLoadCert`, which keeps no certificate
### Unknown function info
@ -106,6 +107,7 @@ Throughout the project, every function at every stage either **does exactly what
- [sceHttpParseResponseHeader](../../core/libs/prx/libSceHttp/Export.cpp) (libSceHttp) - signature follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Net/Http.cs); parsing and error codes follow [shadPS4's reverse-engineered PS4 library](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp), not confirmed on a PS5 title or hardware. Folded values retain their line breaks and whitespace; an empty first line starts the value scan after its line feed. A consumed byte count above `INT_MAX` throws instead of wrapping.
- [sceHttpParseStatusLine](../../core/libs/prx/libSceHttp/src/Parse.cpp) (libSceHttp) - behaviour and error codes follow the [shadPS4](https://github.com/shadps4-emu/shadPS4) reimplementation of the PS4 library, not confirmed on a PS5 title; unlike it, no byte past `lineLen` is read
- [sceHttpUriUnescape](../../core/libs/prx/libSceHttp/src/Uri.cpp) (libSceHttp) - signature follows [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Net/Http.cs); percent decoding, invalid sequences and error codes follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp), not confirmed on a PS5 title or hardware. Size includes the final NUL; malformed escapes and `+` remain unchanged, and decoding runs once.
- [sceHttpSetResponseHeaderMaxSize, sceHttpRedirectCacheFlush, sceHttpsUnloadCert](../../core/libs/prx/libSceHttp/Export.cpp) (libSceHttp) - signatures follow [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/network/http.cpp) (PS4); no PS5 reference has them
- [sceHttp2GetMemoryPoolStats](../../core/libs/prx/libSceHttp2/Export.cpp) (libSceHttp2) - unknown signature
- [sceNetGetMemoryPoolStats](../../core/libs/prx/libSceNet/Export.cpp) (libSceNet) - unknown signature
- [sceHttpSetRequestStatusCallback](../../core/libs/prx/libSceHttp/Export.cpp) (libSceHttp) - no reference implements it (shadPS4 only logs and returns 0); when the callback runs and what status it gets is unknown