aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/http.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-08-31 17:05:52 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-08-31 17:05:52 +0200
commitb04e6e56ab1e69853abebfb950539e3a3aefbdf2 (patch)
treec1907cda3384aee854dbeb5132bed029ae26e595 /libmproxy/protocol/http.py
parent41e6e538dfa758b7d9f867f85f62e881ae408684 (diff)
downloadmitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.gz
mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.bz2
mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.zip
update inline script hooks
Diffstat (limited to 'libmproxy/protocol/http.py')
-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 3b62c389..f0f4ac24 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -418,7 +418,7 @@ class HttpLayer(Layer):
# call the appropriate script hook - this is an opportunity for an
# inline script to set flow.stream = True
flow = self.channel.ask("responseheaders", flow)
- if flow is None or flow == Kill:
+ if flow == Kill:
raise Kill()
if self.supports_streaming:
@@ -442,7 +442,7 @@ class HttpLayer(Layer):
[repr(flow.response)]
)
response_reply = self.channel.ask("response", flow)
- if response_reply is None or response_reply == Kill:
+ if response_reply == Kill:
raise Kill()
def process_request_hook(self, flow):
@@ -462,7 +462,7 @@ class HttpLayer(Layer):
flow.request.scheme = "https" if self.__original_server_conn.tls_established else "http"
request_reply = self.channel.ask("request", flow)
- if request_reply is None or request_reply == Kill:
+ if request_reply == Kill:
raise Kill()
if isinstance(request_reply, HTTPResponse):
flow.response = request_reply