Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't invoke response block more than once due to retry #87

Closed
wants to merge 1 commit into from

Conversation

jstanley0
Copy link
Contributor

If a socket error occurs while performing a streaming download via the response block provided to transport_request, avoid calling the response block again as this would result in duplicate data received by the client.

fixes #86

If a socket error occurs while performing a streaming download via
the response block provided to transport_request, avoid calling
the response block again as this would result in duplicate data
received by the client.

fixes ruby#86
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

It would be good if this added tests, but regardless I think it should be committed. This fixes Ruby Bug #11526.

@jeremyevans jeremyevans requested a review from nurse August 22, 2023 22:28
Copy link
Member

@nobu nobu left a comment

Choose a reason for hiding this comment

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

A test would be required.

@nurse
Copy link
Member

nurse commented Jan 5, 2024

@jeremyevans You can merge this if you provide a test

matzbot pushed a commit to ruby/ruby that referenced this pull request Jan 5, 2024
If a socket error occurs while performing a streaming download via
the response block provided to transport_request, avoid calling
the response block again as this would result in duplicate data
received by the client.

Fixes ruby/net-http#86
Fixes ruby/net-http#87

Fixes [Bug #11526]

ruby/net-http@114d01b092

Co-authored-by: Jeremy Stanley <jeremy@instructure.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

retry in streaming response causes corrupt downloads
4 participants