aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2019-09-05 22:14:04 +0200
committerGitHub <noreply@github.com>2019-09-05 22:14:04 +0200
commitddaf5a1f1ba9e4607c7cdc9378276ef2ddc2e236 (patch)
tree880fdb5ee6e29793c3dd76ba2722e29a1a17a927
parentede2d1b243713e847eff87aa8dc6913ab694b920 (diff)
parente97a804e89454f5f5f546f3f99635ca8b99d75d3 (diff)
downloadmitmproxy-ddaf5a1f1ba9e4607c7cdc9378276ef2ddc2e236.tar.gz
mitmproxy-ddaf5a1f1ba9e4607c7cdc9378276ef2ddc2e236.tar.bz2
mitmproxy-ddaf5a1f1ba9e4607c7cdc9378276ef2ddc2e236.zip
Merge pull request #3627 from RamiBerm/patch-1
Updated har_dump,py timings dictionary function
-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..414b4f61 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.