httprb / http

HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
MIT License
3.01k stars 321 forks source link

Correctly reset the parser #686

Closed bryanp closed 3 years ago

bryanp commented 3 years ago

Resolves https://github.com/httprb/http/issues/685.

irb(main):004:0> HTTP.via('127.0.0.1', 8080).get('https://httpbin.org/get')
=> #<HTTP::Response/1.1 200 OK {"Date"=>"Thu, 09 Sep 2021 22:27:04 GMT", "Content-Type"=>"application/json", "Content-Length"=>"235", "Connection"=>"close", "Server"=>"gunicorn/19.9.0", "Access-Control-Allow-Origin"=>"*", "Access-Control-Allow-Credentials"=>"true"}>

I propose we include this as part of a 0.5.2 release.

tarcieri commented 3 years ago

Thank you!