Skip to content

fix(http): retain bodies for empty redirect locations - #17

Open
JJenkx wants to merge 3 commits into
feat/linux-http-transportfrom
fix/linux-http-empty-redirect
Open

JJenkx wants to merge 3 commits into
feat/linux-http-transportfrom
fix/linux-http-empty-redirect

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

What

When automatic redirects are enabled, a 302 response with an empty or whitespace-only Location header loses its response body. The Linux backend marks it as an intermediate redirect and discards the bytes, although curl ignores the empty destination and returns that response.

Only a nonblank Location value now marks a response as a redirect. Add loopback regressions that preserve status 302 and the no destination body for empty and whitespace-only values. Existing valid redirect coverage remains. This follows the pinned curl header handling in lib/http.c; console redirect semantics remain unmeasured.

Tested

The added regression fails before the production change with empty redirect discarded response body; both cases pass after it. Full bundled Linux Release integration build on upstream ee4962190, commit 845f711a5; seven selected checks pass without skips, including the network suite, offline HTTP/HTTP2, response headers, SSL, patched libraries and pad. The new condition and regression cases match the tested integration. The integration also includes the separate partial-body fix from fork PR #16 and other development changes; that fix is not included in this topic. Topic and integration conventions pass. Windows and an independent full topic build have not been run. No title progression or new guest exports are claimed.

This is a review PR in the JJenkx fork. The upstream author quota is occupied by boykopovar#4474. It is based on the Linux transport branch so the diff contains only this follow-up.

Checklist

  • One topic per PR; follow-up to the Linux HTTP transport
  • No comments added to code
  • Generic response handling; no title-specific workaround
  • No game assets, screenshots or investigation logs added
  • No new third-party code
  • Depends on: feat(http): add Linux HTTP and HTTPS streaming transport #15
  • Unblocks: none
  • AI-assisted: yes

October 13 upstream update

Updated against upstream 9d0a41d5a10 and the transport parent's new head 2ec383a8c6; the published head is c58d9c0b69. It merges cleanly with its transport parent and newer upstream 0214069e33c (the intervening upstream change only updates the build workflow). Local conventions pass against the updated parent. The validation reported above applies to its original tested revision.

This PR deliberately targets feat/linux-http-transport to keep its follow-up diff separate. The repository's manual full-build workflow only accepts PRs targeting main, so its inapplicable dispatch was cancelled. Targeted validation of this updated head is reported below.

Targeted validation of published head c58d9c0b69: Linux Release with bundled pinned dependencies; guest_http_tests, guest_http_response_header_tests and guest_http_network_tests build successfully. All three corresponding CTest checks pass without skips, including the local HTTP/HTTPS transport regression fixture. Each parent/follow-up branch was checked out and rebuilt separately in the same isolated validation worktree; these are individual branch results. This is a targeted Linux build, not full Windows or full-suite validation.

This branch has not been deployed

No deployments
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.

1 participant