aboutsummaryrefslogtreecommitdiffstats
path: root/examples/complex/har_dump.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2019-11-15 18:10:42 +0100
committerMaximilian Hils <git@maximilianhils.com>2019-11-15 18:10:42 +0100
commit0873566ff05c02be063f3aa15adecb725342119c (patch)
treea6dcddf0f0c08c9ff9cdd89e1f95196af2ff5a6a /examples/complex/har_dump.py
parentd852f292c9a45de7f45cc8537f2aef217259017e (diff)
parentfbbbbb678e77e3cff5ab35b1fd55e85e875ed3f5 (diff)
downloadmitmproxy-0873566ff05c02be063f3aa15adecb725342119c.tar.gz
mitmproxy-0873566ff05c02be063f3aa15adecb725342119c.tar.bz2
mitmproxy-0873566ff05c02be063f3aa15adecb725342119c.zip
Merge remote-tracking branch 'origin/master' into pr-3448
Diffstat (limited to 'examples/complex/har_dump.py')
-rw-r--r--examples/complex/har_dump.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/complex/har_dump.py b/examples/complex/har_dump.py
index 33a2f79f..e3cea9fd 100644
--- a/examples/complex/har_dump.py
+++ b/examples/complex/har_dump.py
@@ -87,7 +87,10 @@ def response(flow):
}
# HAR timings are integers in ms, so we re-encode the raw timings to that format.
- timings = dict([(k, int(1000 * v)) for k, v in timings_raw.items()])
+ timings = {
+ k: int(1000 * v) if v != -1 else -1
+ for k, v in timings_raw.items()
+ }
# full_time is the sum of all timings.
# Timings set to -1 will be ignored as per spec.