Fix reverting of a flow

This commit is contained in:
Miroslav 2018-02-10 20:29:38 +02:00
parent a71d050fbf
commit 8eec21d553
2 changed files with 2 additions and 0 deletions

View File

@ -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")

View File

@ -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":