mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-12-08 00:00:58 -05:00
removing pushed request from pending to avoid race-condition on sent requests
This commit is contained in:
parent
04d96b56d2
commit
57a62fe19a
@ -44,6 +44,7 @@ module HTTPX
|
||||
if request
|
||||
request.merge_headers(headers)
|
||||
@promise_headers[stream] = request
|
||||
parser.pending.delete(request)
|
||||
else
|
||||
stream.refuse
|
||||
end
|
||||
|
||||
@ -4,7 +4,7 @@ module Requests
|
||||
module Plugins
|
||||
module PushPromise
|
||||
def test_plugin_push_promise_get
|
||||
client = HTTPX.with(debug_level: 2, debug: $stderr).plugin(:push_promise)
|
||||
client = HTTPX.plugin(:push_promise)
|
||||
html, css = client.get(push_html_uri, push_css_uri)
|
||||
verify_status(html.status, 200)
|
||||
verify_status(css.status, 200)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user