You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.