diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-10-20 10:46:47 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-10-20 10:46:47 +1300 |
commit | 9870844b38c84e7446b15909758497cecb26301e (patch) | |
tree | abb86d6ff64934ec274e5cf2cd5634e92480623a /netlib/http/http1/read.py | |
parent | e0f3cce14cb26d10bc259d431f688fb0d10ab3f5 (diff) | |
download | mitmproxy-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/http1/read.py')
-rw-r--r-- | netlib/http/http1/read.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py index 4c00a96a..89b73c5a 100644 --- a/netlib/http/http1/read.py +++ b/netlib/http/http1/read.py @@ -6,7 +6,7 @@ from netlib.http import request from netlib.http import response from netlib.http import headers from netlib.http import url -from netlib import utils +from netlib import check from netlib import exceptions @@ -274,7 +274,7 @@ def _parse_authority_form(hostport): try: host, port = hostport.split(b":") port = int(port) - if not utils.is_valid_host(host) or not utils.is_valid_port(port): + if not check.is_valid_host(host) or not check.is_valid_port(port): raise ValueError() except ValueError: raise exceptions.HttpSyntaxException("Invalid host specification: {}".format(hostport)) |