mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Fix reverting of a flow
This commit is contained in:
parent
a71d050fbf
commit
8eec21d553
@ -178,6 +178,7 @@ class Core:
|
||||
for f in flows:
|
||||
p = getattr(f, part, None)
|
||||
if p:
|
||||
f.backup()
|
||||
current_enc = p.headers.get("content-encoding", "identity")
|
||||
if current_enc == "identity":
|
||||
p.encode("deflate")
|
||||
|
@ -383,6 +383,7 @@ class ConsoleAddon:
|
||||
part in ("response-headers", "response-body", "set-cookies") and
|
||||
flow.response is None
|
||||
)
|
||||
flow.backup()
|
||||
if require_dummy_response:
|
||||
flow.response = http.HTTPResponse.make()
|
||||
if part == "cookies":
|
||||
|
Loading…
Reference in New Issue
Block a user