mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
fixing alt-svc match: if the alt-svc origin is h2, and the connection origin is https, and host/port match, then reuse the same connection
This commit is contained in:
parent
e30469f8a3
commit
a0db1b13d5
@ -129,10 +129,11 @@ module HTTPX
|
||||
# checks if this is connection is an alternative service of
|
||||
# +uri+
|
||||
def match_altsvcs?(uri)
|
||||
AltSvc.cached_altsvc(@origin).any? do |altsvc|
|
||||
origin = altsvc["origin"]
|
||||
origin.altsvc_match?(uri.origin)
|
||||
end
|
||||
@origins.any? { |origin| uri.altsvc_match?(origin) } ||
|
||||
AltSvc.cached_altsvc(@origin).any? do |altsvc|
|
||||
origin = altsvc["origin"]
|
||||
origin.altsvc_match?(uri.origin)
|
||||
end
|
||||
end
|
||||
|
||||
def connecting?
|
||||
|
Loading…
x
Reference in New Issue
Block a user