feat(libSceHttp2): implement request option getters, header removal a… #10536
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10536"
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 noamroger on 2026-10-24T08:49:17Z.
What
Implements seven pending libSceHttp2 exports on top of the merged transport:
sceHttp2RemoveRequestHeader,sceHttp2GetAuthEnabled,sceHttp2GetAutoRedirect,sceHttp2AuthCacheFlush,sceHttp2RedirectCacheFlush,sceHttp2SetAuthInfoCallbackandsceHttp2SetPreSendCallback.Http2::Settings:redirectbecomes anint(the stored value is read back unchanged), and the auth-info and pre-send callbacks are added there, sosceHttp2CreateRequestWithURLcopies them with the rest and they freeze once transport exists. The transport never calls them.Update()can now return the invalid-id error for contexts and cookie boxes, and propagate an error from its update; the option, header and callback calls use that. Other setters keep throwing for those kinds.Http2::AddHeaderreturns0x817B11FEfor a null name or value (after removing the name in mode 0);sceHttp2AddRequestHeaderchecks the mode and thenConnection(0x804311FE) before the id.sceHttp2RemoveRequestHeaderreturns0x817B1025for a null or missing name; the getters read the settings even after send;sceHttp2AuthCacheFlushvalidates the context;sceHttp2RedirectCacheFlushignores its argument (listed under Silent stubs).sceHttp2GetAuthEnabled, which throws instead of writing through it. The pending-export count in the debt file drops from 12 to 5.Tested
Linux (Ubuntu, GCC), full build:
ctest --test-dir build -R guest_http2passes (guest_http2,guest_http2_cookies,guest_http2_options,guest_http2_transport,guest_http2_early_response).guest_http2_optionscovers a request created after a template change and the immutable-after-send case.python3 tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pycannot run in my environment; open PRs touching libSceHttp2 were checked by hand (#9598, #11145 and #11470 already conflict withmain, and none implements these exports).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T12:04:20Z.
Review: DISMISSED
This overlaps #10167 in
core/libs/prx/libSceHttp2/Export.cpp, and #10167 is an open transport rewrite that replaces this file. The repository contribution rules require authors of overlapping PRs to agree on order and record the prerequisite withDepends on. The checklist currently saysDepends on: none, and the PR description only notes the textual conflict. Please coordinate with #10167’s author and update the dependency/order in the checklist before merge; otherwise the combined result has not been reviewed or validated.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-26T20:46:06Z.
Review: CHANGES_REQUESTED
#10167 has merged and this PR now conflicts with
maininCMakeLists.txt,Export.cpp,Http2.hppanddocs/dev/debt/libSceHttp2.md. The textual conflicts are the smaller part; the design needs an author decision:Http2::Settings(Transport.hpp) already storesheaders,authandredirect, andHttp2::AddHeaderandUpdate()inExport.cppalready implementsceHttp2AddRequestHeader,sceHttp2SetAuthEnabledandsceHttp2SetAutoRedirect. The newauthEnabled,autoRedirectandheadersfields onHttp2Handleduplicate that state, and the template-to-request copy is already done throughhandle.settings = parent->settingsinsceHttp2CreateRequestWithURL.mainnow does: setters accept any int for redirect (mainthrows unless it is 0 or 1), mode/Connection/id check order and error codes, andRemove/Geton kinds other than templates and requests. Please move the measured behaviour intoUpdate()andHttp2::AddHeader, and implementsceHttp2RemoveRequestHeader,sceHttp2GetAuthEnabledandsceHttp2GetAutoRedirectonSettings, keeping the rule that settings are immutable oncetransportexists (Update()currently throws then; decide what the getters and Remove do in that case).Settingsso they are copied with the rest. Say in the debt file that the transport never calls them, and state which of the two now-merged debt entries ("TLS settings", "transport") they extend.main, keepguest_http2_cookies,guest_http2_transportandguest_http2_early_responseinCMakeLists.txtnext toguest_http2_options, and extend theguest_http2_optionstest to cover a request created after a template change and the immutable-after-send case.mainnow, minus the seven you implement).Thanks to BunnyFl and wachi35676 for the 13.42 and Windows runs; their results still apply once the code sits on
Settings.