diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-08 17:17:37 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-08 17:17:37 +0100 |
commit | b95f0c997127bb0516cde0609c83c7d2af5ccfbc (patch) | |
tree | e272dddeddaaa0aad007d766a06cc68d5f713a60 /libmproxy/protocol | |
parent | 31925dc9bedde9fcb388d5254b43ac90a12d4eaf (diff) | |
download | mitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.tar.gz mitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.tar.bz2 mitmproxy-b95f0c997127bb0516cde0609c83c7d2af5ccfbc.zip |
fix #411
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/http.py | 6 |
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: |