Skip to content

fix(libSceHttp2): retain HTTP1 read failures after partial data - #1

Merged
kattkaries merged 1 commit into
kattkaries:fix/libSceHttp2-guest-transport-probesfrom
malekaifa:prime-f/http2-sticky-read-timeout-20261127
Nov 29, 2026
Merged

kattkaries merged 1 commit into
kattkaries:fix/libSceHttp2-guest-transport-probesfrom
malekaifa:prime-f/http2-sticky-read-timeout-20261127

Conversation

@malekaifa

@malekaifa malekaifa commented Nov 27, 2026 •

Copy link
Copy Markdown

Stacked follow-up to boykopovar/AnyPS5#27624, based directly on its current source-branch head 8add415ce6ba446abf9caf91ed6667dc9a1278ef.

Fix:

  • When an HTTP/1 read has already staged bytes but a later ReadHttp1 operation fails, persist the original RequestFailure::code in state->readResult and close the connection before returning the copied prefix.
  • Subsequent reads now return that same failure rather than resuming a parser left partway through a chunk/trailer sequence.

Regression:

  • A loopback server sends a chunked response with a full 16 KiB body chunk, a zero-chunk, and a partial trailer line, then stalls past the receive deadline.
  • It resumes by sending the empty trailer terminator after the first read has returned its copied prefix.
  • The next read must retain the original timeout rather than interpreting the resumed empty trailer line as a new chunk-size line.

Independent Windows Release/Ninja validation (WinLibs GCC 15.2.0):

  • Built guest_http2_tests, guest_http2_cookie_tests, guest_http2_options_tests, guest_http2_transport_tests, guest_http2_teardown_tests, and guest_http2_guest_pointer_tests.
  • CTest ^guest_http2: 24/24 passed.
  • guest_http2_guest_pointers: 3/3 consecutive passes.
  • Negative control: removing the sticky readResult/close handling reproduces the invalid chunk-size exception when the peer resumes.
  • tools/check_conventions.py, tools/debt_fold.py --check, tools/guest_pointer_audit.py libSceHttp2, and git diff --check passed.

No console/hardware test was performed.

What

libSceHttp2 Request::Read (HTTP/1 path) now retains the original RequestFailure::code in state->readResult and closes the connection when a ReadHttp1 call fails after bytes were already staged, so subsequent reads return that same failure instead of resuming a chunk/trailer parser. Adds the ChunkedReadKeepsTimeoutAfterServerResumes regression to guest_http2_guest_pointers.

Diff scope (verified via the GitHub API): core/libs/prx/libSceHttp2/Transport.cpp (+3/-1), core/libs/tests/GuestHttp2GuestPointers.cpp (+102/-0). One commit, 1ed49126b7cf91ea0ff30bf252c0ef7fa8074517 — fix(libSceHttp2): retain HTTP1 read failures after partial data (Conventional).

Tested

Author-reported, not independently verified by the maintainer. The maintainer did not build or run tests for this description-only edit; no build or test result below was reproduced here.

  • Windows Release/Ninja build (WinLibs GCC 15.2.0) of guest_http2_tests, guest_http2_cookie_tests, guest_http2_options_tests, guest_http2_transport_tests, guest_http2_teardown_tests, and guest_http2_guest_pointer_tests.
  • CTest ^guest_http2: 24/24 passed; guest_http2_guest_pointers 3/3 consecutive passes.
  • Negative control: removing the sticky readResult/close handling reproduces the invalid chunk-size exception when the peer resumes.
  • tools/check_conventions.py, tools/debt_fold.py --check, tools/guest_pointer_audit.py libSceHttp2, and git diff --check reported passing.

No console/hardware test was performed. Fork PR hosted checks are the CI evidence for this branch.

Checklist

Copilot AI balanced review requested due to automatic review settings November 27, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@kattkaries
kattkaries merged commit d893a5b into kattkaries:fix/libSceHttp2-guest-transport-probes Nov 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants