You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script fails while --server-replay-kill-extra is used in --server-replay, mitmproxy reports wrong flow information #6113
When running a script via -s together with the --server-replay mode and --server-replay-kill-extra, when the script issues a response via flow.response = http.Response.make(…), the response is killed from perspective of the client, but mitmproxy displays the flow as if the response was delivered:
Steps to reproduce the behavior:
Load the script below via -s script.py
Load some previous unrelated capture via --server-replay unrelated.mitm
Use --server-replay-kill-extra
Load a url outside the scope of the script: mitmproxy displays the flow as killed, this is expected
Load a url within the scope of the script: the flow is killed (so the client e.g. chromium) but mitmproxy pretends it was delivered to the client
Activity
mhils commentedon May 8, 2023
Would changing this:
mitmproxy/mitmproxy/addons/serverplayback.py
Line 241 in 93d16af
to this:
fix your problem? If so, please feel free to submit a PR that fixes this and ideally adds a test so that we don't regress! 😃