aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-03-27 13:15:57 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-03-27 13:15:57 +0200
commitdfcfa6263cd8d2208155a45d35ef4434dc967be2 (patch)
tree4f5e85e0ef040f5aabcbecb48a965b88ab1e3d84
parent04cb099b15b281cb4ff76be0e5d7ec6efb199bbf (diff)
downloadmitmproxy-dfcfa6263cd8d2208155a45d35ef4434dc967be2.tar.gz
mitmproxy-dfcfa6263cd8d2208155a45d35ef4434dc967be2.tar.bz2
mitmproxy-dfcfa6263cd8d2208155a45d35ef4434dc967be2.zip
add safeguard
-rw-r--r--mitmproxy/protocol/http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mitmproxy/protocol/http.py b/mitmproxy/protocol/http.py
index 22e71422..56c5f9ea 100644
--- a/mitmproxy/protocol/http.py
+++ b/mitmproxy/protocol/http.py
@@ -231,7 +231,8 @@ class HttpLayer(Layer):
six.reraise(ProtocolException, ProtocolException(
"Error in HTTP connection: %s" % repr(e)), sys.exc_info()[2])
finally:
- flow.live = False
+ if flow:
+ flow.live = False
def get_request_from_client(self):
request = self.read_request()