diff options
author | Jeremy Evans <[email protected]> | 2024-01-05 08:51:32 -0800 |
---|---|---|
committer | git <[email protected]> | 2024-01-05 16:51:37 +0000 |
commit | 4d03140009044096ac1903281682f357ab4acf98 () | |
tree | 9230f11f51931c4240cdaa43b68bd9278621aed6 /test/net | |
parent | 37657c79b66994147e41f31139ceb9c0c840868f (diff) |
[ruby/net-http] Don't invoke response block more than once due to retry
If a socket error occurs while performing a 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 https://.com/ruby/net-http/pull/86 Fixes https://.com/ruby/net-http/pull/87 Fixes [Bug #11526] https://.com/ruby/net-http/commit/114d01b092 Co-authored-by: Jeremy Stanley <[email protected]>
-rw-r--r-- | test/net/http/test_http.rb | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1234,6 +1234,16 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase } end def test_keep_alive_server_close def @server.run(sock) sock.close |