Skip to content

Close the connection when a request does not finish - #388

Open
mame wants to merge 1 commit into
ruby:masterfrom
mame:close-unfinished-connection
Open

mame wants to merge 1 commit into
ruby:masterfrom
mame:close-unfinished-connection

Conversation

@mame

@mame mame commented Nov 30, 2026

Copy link
Copy Markdown
Member

Leaving the block of Net::HTTP#request with break, return, throw or an exception that is not a StandardError left the rest of the response on the connection, and the next request read it as its own response. Close the connection unless the request finished.

Fixes #157

Reported-by: Alexander Medela Ayarzaguena (https://hackerone.com/alexandermedela)

Leaving the block of Net::HTTP#request with break, return, throw or an
exception that is not a StandardError left the rest of the response on
the connection, and the next request read it as its own response. Close
the connection unless the request finished.

Fixes ruby#157

Reported-by: Alexander Medela Ayarzaguena (https://hackerone.com/alexandermedela)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@shioimm shioimm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me 👍

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.

Response to interrupted request returned for next one, after timeout interrupts reading the socket

2 participants