fix conversion of old flows failing due to missing array keys
This commit is contained in:
parent
a793a6256a
commit
9af41b7f72
|
@ -174,19 +174,22 @@ def convert_6_7(data):
|
|||
|
||||
def convert_7_8(data):
|
||||
data["version"] = 8
|
||||
data["request"]["trailers"] = None
|
||||
if data["response"] is not None:
|
||||
if "request" in data and data["request"] is not None:
|
||||
data["request"]["trailers"] = None
|
||||
if "response" in data and data["response"] is not None:
|
||||
data["response"]["trailers"] = None
|
||||
return data
|
||||
|
||||
|
||||
def convert_8_9(data):
|
||||
data["version"] = 9
|
||||
data["request"].pop("first_line_format")
|
||||
data["request"]["authority"] = b""
|
||||
is_request_replay = data["request"].pop("is_replay", False)
|
||||
is_request_replay = False
|
||||
if "request" in data:
|
||||
data["request"].pop("first_line_format")
|
||||
data["request"]["authority"] = b""
|
||||
is_request_replay = data["request"].pop("is_replay", False)
|
||||
is_response_replay = False
|
||||
if data["response"] is not None:
|
||||
if "response" in data and 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"
|
||||
|
|
Loading…
Reference in New Issue