From 1205589faeea9dc467ac17ccbdd61d5dac7ebc18 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Wed, 3 Aug 2022 16:52:31 -0700 Subject: [PATCH] decompress and json.loads --- warcprox/warcproxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warcprox/warcproxy.py b/warcprox/warcproxy.py index 645055e..42996e5 100644 --- a/warcprox/warcproxy.py +++ b/warcprox/warcproxy.py @@ -177,7 +177,7 @@ class WarcProxyHandler(warcprox.mitmproxy.MitmProxyHandler): self._security_check(warcprox_meta) self._enforce_limits(warcprox_meta) if 'compressed_blocks' in warcprox_meta: - warcprox_meta['blocks'] = zlib.decompress(warcprox_meta['compressed_blocks']).decode().split('~~') + warcprox_meta['blocks'] = json.loads(zlib.decompress(warcprox_meta['compressed_blocks']).decode()) del warcprox_meta['compressed_blocks'] self._enforce_blocks(warcprox_meta)