aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/url.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-20 10:46:47 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-20 10:46:47 +1300
commit9870844b38c84e7446b15909758497cecb26301e (patch)
treeabb86d6ff64934ec274e5cf2cd5634e92480623a /netlib/http/url.py
parente0f3cce14cb26d10bc259d431f688fb0d10ab3f5 (diff)
downloadmitmproxy-9870844b38c84e7446b15909758497cecb26301e.tar.gz
mitmproxy-9870844b38c84e7446b15909758497cecb26301e.tar.bz2
mitmproxy-9870844b38c84e7446b15909758497cecb26301e.zip
netlib.utils -> netlib.check
Now only contains is_valid_[host,port] Intermediate step - this will be in mitproxy.net soon.
Diffstat (limited to 'netlib/http/url.py')
-rw-r--r--netlib/http/url.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/netlib/http/url.py b/netlib/http/url.py
index 67e22efa..3ca58120 100644
--- a/netlib/http/url.py
+++ b/netlib/http/url.py
@@ -2,7 +2,7 @@ import urllib
from typing import Sequence
from typing import Tuple
-from netlib import utils
+from netlib import check
# PY2 workaround
@@ -62,9 +62,9 @@ def parse(url):
if not full_path.startswith(b"/"):
full_path = b"/" + full_path
- if not utils.is_valid_host(host):
+ if not check.is_valid_host(host):
raise ValueError("Invalid Host")
- if not utils.is_valid_port(port):
+ if not check.is_valid_port(port):
raise ValueError("Invalid Port")
return parsed.scheme, host, port, full_path