lib/httpx/plugins/expect.rb in httpx-0.17.0 vs lib/httpx/plugins/expect.rb in httpx-0.18.0

- old
+ new

@@ -67,20 +67,24 @@ super end end module ConnectionMethods - def send(request) + def send_request_to_parser(request) + super + + return unless request.headers["expect"] == "100-continue" + request.once(:expect) do - @timers.after(@options.expect_timeout) do + @timers.after(request.options.expect_timeout) do + # expect timeout expired if request.state == :expect && !request.expects? Expect.no_expect_store << request.origin request.headers.delete("expect") consume end end end - super end end module InstanceMethods def fetch_response(request, connections, options)