diff options
Diffstat (limited to 'libmproxy/flow_format_compat.py')
-rw-r--r-- | libmproxy/flow_format_compat.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libmproxy/flow_format_compat.py b/libmproxy/flow_format_compat.py index 2b99b805..9920dfce 100644 --- a/libmproxy/flow_format_compat.py +++ b/libmproxy/flow_format_compat.py @@ -21,9 +21,22 @@ def convert_014_015(data): return data +def convert_015_016(data): + for m in ("request", "response"): + if "body" in data[m]: + data[m]["content"] = data[m].pop("body") + if "httpversion" in data[m]: + data[m]["http_version"] = data[m].pop("httpversion") + if "msg" in data["response"]: + data["response"]["reason"] = data["response"].pop("msg") + data["version"] = (0, 16) + return data + + converters = { (0, 13): convert_013_014, (0, 14): convert_014_015, + (0, 15): convert_015_016, } |