aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/http.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-25 19:59:39 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-07-25 20:00:34 +0200
commite9bbcfadc13539c2ccf62500bfb892761c8c36ec (patch)
treee7f0bd882bdeffc3bfc53fd77a347e9eadd3b5c9 /libmproxy/protocol/http.py
parent07c9d46fab1e5934b1b0e105f11006f058917f8b (diff)
downloadmitmproxy-e9bbcfadc13539c2ccf62500bfb892761c8c36ec.tar.gz
mitmproxy-e9bbcfadc13539c2ccf62500bfb892761c8c36ec.tar.bz2
mitmproxy-e9bbcfadc13539c2ccf62500bfb892761c8c36ec.zip
fix module imports
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r--libmproxy/protocol/http.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 818b8811..821d759c 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -9,7 +9,7 @@ from email.utils import parsedate_tz, formatdate, mktime_tz
import netlib
from netlib import http, tcp, odict, utils
-from netlib.http import cookies
+from netlib.http import cookies, http1
from .tcp import TCPHandler
from .primitives import KILL, ProtocolHandler, Flow, Error
@@ -360,7 +360,7 @@ class HTTPRequest(HTTPMessage):
if hasattr(rfile, "reset_timestamps"):
rfile.reset_timestamps()
- protocol = http.http1.HTTP1Protocol(rfile=rfile, wfile=wfile)
+ protocol = http1.HTTP1Protocol(rfile=rfile, wfile=wfile)
req = protocol.read_request(
include_body = include_body,
body_size_limit = body_size_limit,
@@ -771,7 +771,7 @@ class HTTPResponse(HTTPMessage):
if hasattr(rfile, "reset_timestamps"):
rfile.reset_timestamps()
- protocol = http.http1.HTTP1Protocol(rfile=rfile)
+ protocol = http1.HTTP1Protocol(rfile=rfile)
resp = protocol.read_response(
request_method,
body_size_limit,
@@ -1094,7 +1094,7 @@ class HTTPHandler(ProtocolHandler):
if flow.response.stream:
flow.response.content = CONTENT_MISSING
else:
- protocol = http.http1.HTTP1Protocol(rfile=self.c.server_conn.rfile)
+ protocol = http1.HTTP1Protocol(rfile=self.c.server_conn.rfile)
flow.response.content = protocol.read_http_body(
flow.response.headers,
self.c.config.body_size_limit,
@@ -1435,7 +1435,7 @@ class HTTPHandler(ProtocolHandler):
h = flow.response._assemble_head(preserve_transfer_encoding=True)
self.c.client_conn.send(h)
- protocol = http.http1.HTTP1Protocol(rfile=self.c.server_conn.rfile)
+ protocol = http1.HTTP1Protocol(rfile=self.c.server_conn.rfile)
chunks = protocol.read_http_body_chunked(
flow.response.headers,
self.c.config.body_size_limit,
@@ -1458,13 +1458,13 @@ class HTTPHandler(ProtocolHandler):
semantics. Returns True, if so.
"""
close_connection = (
- http.http1.HTTP1Protocol.connection_close(
+ http1.HTTP1Protocol.connection_close(
flow.request.httpversion,
flow.request.headers
- ) or http.http1.HTTP1Protocol.connection_close(
+ ) or http1.HTTP1Protocol.connection_close(
flow.response.httpversion,
flow.response.headers
- ) or http.http1.HTTP1Protocol.expected_http_body_size(
+ ) or http1.HTTP1Protocol.expected_http_body_size(
flow.response.headers,
False,
flow.request.method,