aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/http1
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-07 17:12:52 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-07 17:12:52 +1200
commit1ffc273c9433fc8840b71c79879ae427c93313bd (patch)
treea656cb3f336a64d37967dbd4c36cad040370d72a /netlib/http/http1
parentb180bfcf35302cb37f93be60ff954c6d645002b0 (diff)
downloadmitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.tar.gz
mitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.tar.bz2
mitmproxy-1ffc273c9433fc8840b71c79879ae427c93313bd.zip
Utils cleanups
- Move more stuff that belongs in netlib.human - Move some stuff to near the only use - Zap mitmproxy.utils.timestamp(). I see the rationale, but we used it interchangeably with time.time() throughout the project. Since time.time() dominates in the codebase and timestamp() is such low utility, away it goes.
Diffstat (limited to 'netlib/http/http1')
-rw-r--r--netlib/http/http1/assemble.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/http/http1/assemble.py b/netlib/http/http1/assemble.py
index 00d1563b..511328f1 100644
--- a/netlib/http/http1/assemble.py
+++ b/netlib/http/http1/assemble.py
@@ -1,6 +1,6 @@
from __future__ import absolute_import, print_function, division
-from netlib import utils
+import netlib.http.url
from netlib import exceptions
@@ -82,7 +82,7 @@ def _assemble_request_headers(request_data):
"""
headers = request_data.headers.copy()
if "host" not in headers and request_data.scheme and request_data.host and request_data.port:
- headers["host"] = utils.hostport(
+ headers["host"] = netlib.http.url.hostport(
request_data.scheme,
request_data.host,
request_data.port