Skip to content

proxy: fix google_only plain HTTP content length#70

Merged
therealaleph merged 3 commits into
therealaleph:mainfrom
freeinternet865:fix/google-only-content-length
Apr 23, 2026
Merged

proxy: fix google_only plain HTTP content length#70
therealaleph merged 3 commits into
therealaleph:mainfrom
freeinternet865:fix/google-only-content-length

Conversation

@freeinternet865
Copy link
Copy Markdown
Contributor

The google_only 502 response for plain HTTP requests advertised Content-Length: 128 even though the body is 120 bytes. Some clients can treat that as a truncated response and wait for bytes that never arrive.

This mismatch was first introduced in #62.

@dazzling-no-more

freeinternet865 added 3 commits April 23, 2026 15:35
The google_only 502 response for plain HTTP requests advertised Content-Length: 128 even though the body is 120 bytes. Some clients can treat that as a truncated response and wait for bytes that never arrive.

This mismatch was first introduced in #62.
Add a regression test for the google_only plain-HTTP 502 response framing. It exercises the real handle_http_client path and verifies the response body's byte count matches the advertised Content-Length.

This covers the Content-Length mismatch first introduced in #62.
This reverts commit db09261c76889ffea3a8930f429922f066b25d2a.
@freeinternet865
Copy link
Copy Markdown
Contributor Author

I pushed the test and then reverted it, so you can evaluate it yourself if needed; however, I believe including it in the final merge would have been unnecessary and disproportionate to the scope of the fix.

@therealaleph therealaleph merged commit 8c4fa73 into therealaleph:main Apr 23, 2026
@freeinternet865 freeinternet865 deleted the fix/google-only-content-length branch April 23, 2026 17:07
therealaleph pushed a commit that referenced this pull request Apr 25, 2026
Body is exactly 120 bytes; header was advertising 128. Some clients treat that as truncated and hang waiting for extra bytes. Regression from #62.
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.

2 participants