aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-19 11:59:05 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-19 11:59:05 +0200
commit6d27901b6fe44a651788e07d9e2de4d367be925e (patch)
tree56a81938e6ce487537cb415055c1553c1c014be6 /libmproxy
parent42bbd3c928eccf062b5d730249422bd16f94dfc1 (diff)
downloadmitmproxy-6d27901b6fe44a651788e07d9e2de4d367be925e.tar.gz
mitmproxy-6d27901b6fe44a651788e07d9e2de4d367be925e.tar.bz2
mitmproxy-6d27901b6fe44a651788e07d9e2de4d367be925e.zip
fix replay functionality
Diffstat (limited to 'libmproxy')
-rw-r--r--libmproxy/protocol/http_replay.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmproxy/protocol/http_replay.py b/libmproxy/protocol/http_replay.py
index 14fbe547..b7faad07 100644
--- a/libmproxy/protocol/http_replay.py
+++ b/libmproxy/protocol/http_replay.py
@@ -80,17 +80,17 @@ class RequestReplayThread(threading.Thread):
server.wfile.write(http1.assemble_request(r))
server.wfile.flush()
self.flow.server_conn = server
- self.flow.response = http1.read_response(
+ self.flow.response = HTTPResponse.wrap(http1.read_response(
server.rfile,
r,
body_size_limit=self.config.body_size_limit
- )
+ ))
if self.channel:
response_reply = self.channel.ask("response", self.flow)
if response_reply == Kill:
raise Kill()
- except (ReplayException, HttpException, TcpException) as v:
- self.flow.error = Error(repr(v))
+ except (ReplayException, HttpException, TcpException) as e:
+ self.flow.error = Error(str(e))
if self.channel:
self.channel.ask("error", self.flow)
except Kill: