mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-08 00:02:42 -04:00
h2c: fixed a bug, when the upgrade request already had the final response, and it was trying to repeat the request (identify the case and exit early)
This commit is contained in:
parent
cfe712ca01
commit
33423f9774
@ -29,6 +29,11 @@ module HTTPX
|
||||
parser.upgrade(upgrade_request, upgrade_response, **options)
|
||||
data = upgrade_response.to_s
|
||||
parser << data
|
||||
response = upgrade_request.response
|
||||
if response.status == 200
|
||||
requests.delete(upgrade_request)
|
||||
return response if requests.empty?
|
||||
end
|
||||
responses = __send_reqs(*requests)
|
||||
else
|
||||
# proceed as usual
|
||||
|
Loading…
x
Reference in New Issue
Block a user