mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
moved check o expect-100 response to the headers callback, as in http2, it doesn't close the stream when waiting for the body (I have no idea how this was working)
This commit is contained in:
parent
e7181132ab
commit
1b97001b5f
@ -205,6 +205,8 @@ module HTTPX
|
||||
response = request.options.response_class.new(request, status, "2.0", headers)
|
||||
request.response = response
|
||||
@streams[request] = stream
|
||||
|
||||
handle(request, stream) if request.expects?
|
||||
end
|
||||
|
||||
def on_stream_data(stream, request, data)
|
||||
@ -214,8 +216,6 @@ module HTTPX
|
||||
end
|
||||
|
||||
def on_stream_close(stream, request, error)
|
||||
return handle(request, stream) if request.expects?
|
||||
|
||||
if error && error != :no_error
|
||||
ex = Error.new(stream.id, error)
|
||||
ex.set_backtrace(caller)
|
||||
|
Loading…
x
Reference in New Issue
Block a user