mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
when using connection coalescing, make sure that, if we're using host
certificate verification, that the coalescable connection also wants to use https
This commit is contained in:
parent
de6adec305
commit
1765f6c645
@ -101,7 +101,9 @@ module HTTPX
|
||||
# coalescable connections need to be mergeable!
|
||||
# but internally, #mergeable? is called before #coalescable?
|
||||
def coalescable?(connection)
|
||||
if @io.protocol == "h2" && @origin.scheme == "https"
|
||||
if @io.protocol == "h2" &&
|
||||
@origin.scheme == "https" &&
|
||||
connection.origin.scheme == "https"
|
||||
@io.verify_hostname(connection.origin.host)
|
||||
else
|
||||
@origin == connection.origin
|
||||
|
Loading…
x
Reference in New Issue
Block a user