lib/http/client.rb in http-1.0.0.pre1 vs lib/http/client.rb in http-1.0.0.pre2

- old
+ new

@@ -59,24 +59,23 @@ @connection.send_request(req) @connection.read_headers! end res = Response.new( - @connection.status_code, - @connection.http_version, - @connection.headers, - Response::Body.new(@connection), - req.uri + :status => @connection.status_code, + :version => @connection.http_version, + :headers => @connection.headers, + :connection => @connection, + :encoding => options.encoding, + :uri => req.uri ) @connection.finish_response if req.verb == :head @state = :clean res rescue - # On any exception we reset the conn. This is a safety measure, to ensure - # we don't have conns in a bad state resulting in mixed requests/responses - close if persistent? + close raise end def close @connection.close if @connection