diff options
Diffstat (limited to 'libmproxy/flow.py')
-rw-r--r-- | libmproxy/flow.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libmproxy/flow.py b/libmproxy/flow.py index f9e2b94d..49ec5a0b 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -309,10 +309,10 @@ class StickyCookieState: # FIXME: We now know that Cookie.py screws up some cookies with # valid RFC 822/1123 datetime specifications for expiry. Sigh. c = Cookie.SimpleCookie(str(i)) - m = c.values()[0] - k = self.ckey(m, f) - if self.domain_match(f.request.host, k[0]): - self.jar[self.ckey(m, f)] = m + for m in c.values(): + k = self.ckey(m, f) + if self.domain_match(f.request.host, k[0]): + self.jar[k] = m def handle_request(self, f): l = [] @@ -824,12 +824,12 @@ class FlowMaster(controller.Master): if self.stickycookie_state: self.stickycookie_state.handle_response(f) - def replay_request(self, f, block=False): + def replay_request(self, f, block=False, run_scripthooks=True): """ Returns None if successful, or error message if not. """ - if f.live: - return "Can't replay request which is still live..." + if f.live and run_scripthooks: + return "Can't replay live request." if f.intercepted: return "Can't replay while intercepting..." if f.request.content == http.CONTENT_MISSING: @@ -845,7 +845,7 @@ class FlowMaster(controller.Master): rt = http.RequestReplayThread( self.server.config, f, - self.masterq, + self.masterq if run_scripthooks else False, self.should_exit ) rt.start() # pragma: no cover |