mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
disable replay from ui for live flows
This commit is contained in:
parent
9a32193005
commit
5d56870818
@ -828,6 +828,8 @@ class FlowMaster(controller.Master):
|
|||||||
"""
|
"""
|
||||||
Returns None if successful, or error message if not.
|
Returns None if successful, or error message if not.
|
||||||
"""
|
"""
|
||||||
|
if f.live and run_scripthooks:
|
||||||
|
return "Can't replay live request."
|
||||||
if f.intercepted:
|
if f.intercepted:
|
||||||
return "Can't replay while intercepting..."
|
return "Can't replay while intercepting..."
|
||||||
if f.request.content == http.CONTENT_MISSING:
|
if f.request.content == http.CONTENT_MISSING:
|
||||||
|
@ -666,6 +666,9 @@ class TestFlowMaster:
|
|||||||
f.intercepted = True
|
f.intercepted = True
|
||||||
assert "intercepting" in fm.replay_request(f)
|
assert "intercepting" in fm.replay_request(f)
|
||||||
|
|
||||||
|
f.live = True
|
||||||
|
assert "live" in fm.replay_request(f, run_scripthooks=True)
|
||||||
|
|
||||||
def test_script_reqerr(self):
|
def test_script_reqerr(self):
|
||||||
s = flow.State()
|
s = flow.State()
|
||||||
fm = flow.FlowMaster(None, s)
|
fm = flow.FlowMaster(None, s)
|
||||||
|
Loading…
Reference in New Issue
Block a user