Loading lib/httpx/connection/http1.rb +4 −3 Original line number Diff line number Diff line Loading @@ -197,9 +197,10 @@ module HTTPX end def handle_error(ex, request = nil) if (ex.is_a?(EOFError) || ex.is_a?(TimeoutError)) && @request && @request.response && !@request.response.headers.key?("content-length") && !@request.response.headers.key?("transfer-encoding") if (ex.is_a?(EOFError) || ex.is_a?(TimeoutError)) && @request && (response = @request.response) && response.is_a?(Response) && !response.headers.key?("content-length") && !response.headers.key?("transfer-encoding") # if the response does not contain a content-length header, the server closing the # connnection is the indicator of response consumed. # https://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.4.4 Loading Loading
lib/httpx/connection/http1.rb +4 −3 Original line number Diff line number Diff line Loading @@ -197,9 +197,10 @@ module HTTPX end def handle_error(ex, request = nil) if (ex.is_a?(EOFError) || ex.is_a?(TimeoutError)) && @request && @request.response && !@request.response.headers.key?("content-length") && !@request.response.headers.key?("transfer-encoding") if (ex.is_a?(EOFError) || ex.is_a?(TimeoutError)) && @request && (response = @request.response) && response.is_a?(Response) && !response.headers.key?("content-length") && !response.headers.key?("transfer-encoding") # if the response does not contain a content-length header, the server closing the # connnection is the indicator of response consumed. # https://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.4.4 Loading