mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
Fix incompatibility reading version 7 files when flow has no response.
A flow can be stored without a response. The compatibility functions for version 8 and 9 assumed that all flows had a response. This changes fixes that assumption.
This commit is contained in:
parent
3e7f9e488a
commit
05a6c56b72
1 changed files with 5 additions and 2 deletions
|
|
@ -175,7 +175,8 @@ def convert_6_7(data):
|
|||
def convert_7_8(data):
|
||||
data["version"] = 8
|
||||
data["request"]["trailers"] = None
|
||||
data["response"]["trailers"] = None
|
||||
if data["response"] is not None:
|
||||
data["response"]["trailers"] = None
|
||||
return data
|
||||
|
||||
|
||||
|
|
@ -184,7 +185,9 @@ def convert_8_9(data):
|
|||
data["request"].pop("first_line_format")
|
||||
data["request"]["authority"] = b""
|
||||
is_request_replay = data["request"].pop("is_replay", False)
|
||||
is_response_replay = data["response"].pop("is_replay", False)
|
||||
is_response_replay = False
|
||||
if data["response"] is not None:
|
||||
is_response_replay = data["response"].pop("is_replay", False)
|
||||
if is_request_replay: # pragma: no cover
|
||||
data["is_replay"] = "request"
|
||||
elif is_response_replay: # pragma: no cover
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue