aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-12-08 17:17:37 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-12-08 17:17:37 +0100
commitb95f0c997127bb0516cde0609c83c7d2af5ccfbc (patch)
treee272dddeddaaa0aad007d766a06cc68d5f713a60 /libmproxy/protocol
parent31925dc9bedde9fcb388d5254b43ac90a12d4eaf (diff)
downloadmitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.tar.gz
mitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.tar.bz2
mitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.zip
fix #411
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r--libmproxy/protocol/http.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 87af8e6d..49f5e8c0 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -1043,7 +1043,7 @@ class HTTPHandler(ProtocolHandler):
# call the appropriate script hook - this is an opportunity for an
# inline script to set flow.stream = True
flow = self.c.channel.ask("responseheaders", flow)
- if flow == KILL:
+ if flow is None or flow == KILL:
raise KillSignal()
else:
# now get the rest of the request body, if body still needs to be
@@ -1086,11 +1086,11 @@ class HTTPHandler(ProtocolHandler):
# sent through to the Master.
flow.request = req
request_reply = self.c.channel.ask("request", flow)
- self.process_server_address(flow) # The inline script may have changed request.host
-
if request_reply is None or request_reply == KILL:
raise KillSignal()
+ self.process_server_address(flow) # The inline script may have changed request.host
+
if isinstance(request_reply, HTTPResponse):
flow.response = request_reply
else: