mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
dc3cd2d2c9
* libNet: honour the option mask in sceHttpUriBuild sceHttpUriBuild's `option` argument (SCE_HTTP_URI_BUILD_WITH_*) selects which components of the SceHttpUriElement end up in the output. HttpUriBuild logged the value and ignored it, always returning the full URL. Black Myth: Wukong calls it with SCHEME alone and requires "https://" (or "http://") back before it starts an HTTP request. The full URL fails that check, so the request starter returns false. The caller's "run on game thread and wait" helper then returns early while its task stays queued, still holding by-reference captures of a stack frame that is already gone. About 70 seconds into boot the game thread runs that task against the dead stack and faults (null read at eboot+0x59662f). With the mask honoured the game gets past that point and reaches its title cinematic and menu. Bits: SCHEME 0x01, HOSTNAME 0x02, PORT 0x04, PATH 0x08, USERNAME 0x10, PASSWORD 0x20, QUERY 0x40, FRAGMENT 0x80. A mask with none of the eight bits set keeps the previous "everything" behaviour for callers that never pass one. A scheme-only build returns "https://", the authority marker belonging to the scheme chunk. Adds TestBuildHonoursOption to http_uri_parse covering scheme-only, hostname, port, path, and the 0xff / 0 cases. * libNet: simplify URI build code and tests --------- Co-authored-by: nmzik <Nmzik@mail.ru>