mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
fix authority handling
This commit is contained in:
parent
44f83b5947
commit
64978968f2
@ -265,12 +265,12 @@ class Http2SingleStreamLayer(_HttpTransmissionLayer, threading.Thread):
|
||||
scheme, host, port, _ = utils.parse_url(path)
|
||||
|
||||
if authority:
|
||||
host, port = authority.split(':')
|
||||
host, _, port = authority.partition(':')
|
||||
|
||||
if host is None:
|
||||
if not host:
|
||||
host = 'localhost'
|
||||
if port is None:
|
||||
port = 80 if scheme == 'http' else 443
|
||||
if not port:
|
||||
port = 443 if scheme == 'https' else 80
|
||||
port = int(port)
|
||||
|
||||
data = []
|
||||
|
Loading…
Reference in New Issue
Block a user