Closed
Description
If a socket error occurs while performing a streaming download via the response block provided to transport_request, a retry may cause the response block may be invoked a second time.
For code patterns like this one:
open('some_file', 'wb') do |io|
http.request(...) do |response|
response.read_body do |chunk|
io.write chunk
end
end
end
The output file will be corrupted since some portion of its data near the beginning will be duplicated.
Metadata
Metadata
Assignees
Labels
No labels