aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-03-06 14:48:16 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-03-06 14:48:16 +1300
commit4f02480482cec13d36ed9b216784c3136e047192 (patch)
tree028db07a0f908c4b14f029863f5b9ac1c7824fa8 /libmproxy/flow.py
parentbad77f3470f11716f700db22f51b1f53285d23ca (diff)
downloadmitmproxy-4f02480482cec13d36ed9b216784c3136e047192.tar.gz
mitmproxy-4f02480482cec13d36ed9b216784c3136e047192.tar.bz2
mitmproxy-4f02480482cec13d36ed9b216784c3136e047192.zip
Allow client replays to be replayed against server replays.
Useful for testing.
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r--libmproxy/flow.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py
index 55976610..5f1e7871 100644
--- a/libmproxy/flow.py
+++ b/libmproxy/flow.py
@@ -54,10 +54,12 @@ class ClientPlaybackState:
if self.flows and not self.current:
n = self.flows.pop(0)
self.current = master.handle_request(n.request)
- if not testing:
+ if not testing and not self.current.response:
#begin nocover
master.state.replay_request(self.current, master.masterq)
#end nocover
+ elif self.current.response:
+ master.handle_response(self.current.response)
class ServerPlaybackState: