aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 10:26:28 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-08-21 10:26:28 +0200
commit05d26545e4c65e8fd2242142833a40a96ce5fb81 (patch)
tree7a004316b39ba3c791966934bf835a95617209dc /libmproxy/protocol
parent55cfd259dc8264ca9bca166b50b0d3dc7ab71451 (diff)
downloadmitmproxy-05d26545e4c65e8fd2242142833a40a96ce5fb81.tar.gz
mitmproxy-05d26545e4c65e8fd2242142833a40a96ce5fb81.tar.bz2
mitmproxy-05d26545e4c65e8fd2242142833a40a96ce5fb81.zip
adapt netlib changes
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/http.py6
-rw-r--r--libmproxy/protocol/http_wrappers.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 4472cb2a..1b168569 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -41,7 +41,7 @@ def send_connect_request(conn, host, port, update_state=True):
protocol = http1.HTTP1Protocol(conn)
conn.send(protocol.assemble(upstream_request))
- resp = HTTPResponse.from_protocol(protocol, upstream_request.method)
+ resp = HTTPResponse.from_protocol(protocol, upstream_request)
if resp.status_code != 200:
raise proxy.ProxyError(resp.status_code,
"Cannot establish SSL " +
@@ -177,7 +177,7 @@ class HTTPHandler(ProtocolHandler):
# Only get the headers at first...
flow.response = HTTPResponse.from_protocol(
self.c.server_conn.protocol,
- flow.request.method,
+ flow.request,
body_size_limit=self.c.config.body_size_limit,
include_body=False,
)
@@ -760,7 +760,7 @@ class RequestReplayThread(threading.Thread):
self.flow.server_conn.protocol = http1.HTTP1Protocol(self.flow.server_conn)
self.flow.response = HTTPResponse.from_protocol(
self.flow.server_conn.protocol,
- r.method,
+ r,
body_size_limit=self.config.body_size_limit,
)
if self.channel:
diff --git a/libmproxy/protocol/http_wrappers.py b/libmproxy/protocol/http_wrappers.py
index e41d65d6..f91b936c 100644
--- a/libmproxy/protocol/http_wrappers.py
+++ b/libmproxy/protocol/http_wrappers.py
@@ -352,12 +352,12 @@ class HTTPResponse(MessageMixin, semantics.Response):
def from_protocol(
self,
protocol,
- request_method,
+ request,
include_body=True,
body_size_limit=None
):
resp = protocol.read_response(
- request_method,
+ request,
body_size_limit,
include_body=include_body
)