aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/controller.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-07-17 11:06:29 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-07-17 11:06:29 +1200
commitca7ca8ec248d2a213622a9d2dca1a192f65365c2 (patch)
tree4476fa6073bd959638c353a4ee8ae49c3a044c83 /mitmproxy/controller.py
parent11bd911e45bd9297d375113f6344f9e1ad680fff (diff)
downloadmitmproxy-ca7ca8ec248d2a213622a9d2dca1a192f65365c2.tar.gz
mitmproxy-ca7ca8ec248d2a213622a9d2dca1a192f65365c2.tar.bz2
mitmproxy-ca7ca8ec248d2a213622a9d2dca1a192f65365c2.zip
The "handled" flag on responses should not persist across calls
Diffstat (limited to 'mitmproxy/controller.py')
-rw-r--r--mitmproxy/controller.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mitmproxy/controller.py b/mitmproxy/controller.py
index 54d75e6b..070ec862 100644
--- a/mitmproxy/controller.py
+++ b/mitmproxy/controller.py
@@ -220,6 +220,12 @@ def handler(f):
if handling and not message.reply.acked and not message.reply.taken:
message.reply.ack()
+
+ # Reset the handled flag - it's common for us to feed the same object
+ # through handlers repeatedly, so we don't want this to persist across
+ # calls.
+ if message.reply.handled:
+ message.reply.handled = False
return ret
# Mark this function as a handler wrapper
wrapper.__dict__["__handler"] = True