aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol/http.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-07-23 00:21:33 +0200
committerMaximilian Hils <git@maximilianhils.com>2014-07-23 00:21:33 +0200
commitd9ac029ec7d18e5c1a483c7141ba86ad185874b0 (patch)
tree72a963000f43ce09f8ce54695f1c17c05abab579 /libmproxy/protocol/http.py
parent4b4a18a2e4d7cf3e8862192b68f5a2295da9acbe (diff)
downloadmitmproxy-d9ac029ec7d18e5c1a483c7141ba86ad185874b0.tar.gz
mitmproxy-d9ac029ec7d18e5c1a483c7141ba86ad185874b0.tar.bz2
mitmproxy-d9ac029ec7d18e5c1a483c7141ba86ad185874b0.zip
always initialize HTTPResponse.stream attribute
Diffstat (limited to 'libmproxy/protocol/http.py')
-rw-r--r--libmproxy/protocol/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py
index 4648c7cf..8b9cb448 100644
--- a/libmproxy/protocol/http.py
+++ b/libmproxy/protocol/http.py
@@ -592,6 +592,7 @@ class HTTPResponse(HTTPMessage):
# Is this request replayed?
self.is_replay = False
+ self.stream = False
_stateobject_attributes = HTTPMessage._stateobject_attributes.copy()
_stateobject_attributes.update(
@@ -918,7 +919,6 @@ class HTTPHandler(ProtocolHandler, TemporaryServerChangeMixin):
# read initially in "stream" mode, so we can get the headers separately
flow.response = self.get_response_from_server(flow.request, include_body=False)
- flow.response.stream = False
# call the appropriate script hook - this is an opportunity for an inline script to set flow.stream = True
self.c.channel.ask("responseheaders", flow)