mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Merge pull request #37 from pritambaral/urlparse
More accurate host, port parsing
This commit is contained in:
commit
52f430c934
@ -45,6 +45,8 @@ def parse_url(url):
|
||||
return None
|
||||
if not scheme:
|
||||
return None
|
||||
if '@' in netloc:
|
||||
_, netloc = string.rsplit(netloc, '@', maxsplit=1)
|
||||
if ':' in netloc:
|
||||
host, port = string.rsplit(netloc, ':', maxsplit=1)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user