Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chansikpark
Copy link
Contributor

@chansikpark chansikpark commented Nov 3, 2025

Crossing some t's and dotting some i's following #2260, I decided to try this suggestion from Copilot:

It’s also useful to add a test where the client continues sending a large body and the server immediately returns 414 and closes the socket.

I found that the client SIGPIPEs. And even after handling these, the response object doesn't get populated when the socket is closed mid-transfer (ie for sufficiently large transfers).

So I made the following changes:

  • Check if socket is alive before waiting to write to it to prevent SIGPIPE
  • Consume SIGPIPE on client
  • Client reads response line and headers after bad request before returning

- Check if socket is alive before waiting to write to it to prevent SIGPIPE
- Consume SIGPIPE on client
- Read response line and headers after bad request
@chansikpark chansikpark marked this pull request as draft November 3, 2025 23:29
@chansikpark
Copy link
Contributor Author

chansikpark commented Nov 3, 2025

I'll see if I can do a little more due dilligence before marking for review.

Also

Move one basic test assertion out of WIN32-only block

Should be

Move one basic test assertion out of non-WIN32 block

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