From 8c75a5cc52605348df3718ea332e74c15fc0b358 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 21 Nov 2017 15:05:26 +0100 Subject: Move base64 metadata into WARC header --- crocoite/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crocoite/cli.py b/crocoite/cli.py index 86ff0ad..54a31d9 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -245,7 +245,6 @@ def main (): rawBody = body['body'] base64Encoded = body['base64Encoded'] if base64Encoded: - logger.debug ('body is base64 encoded') rawBody = b64decode (rawBody) else: rawBody = rawBody.encode ('utf8') @@ -274,6 +273,7 @@ def main (): 'X-Chrome-Protocol': resp.get ('protocol', ''), 'X-Chrome-FromDiskCache': str (resp.get ('fromDiskCache')), 'X-Chrome-ConnectionReused': str (resp.get ('connectionReused')), + 'X-Chrome-Base64Body': str (base64Encoded), } record = writer.create_warc_record(resp['url'], 'response', warc_headers_dict=warcHeaders, payload=BytesIO (rawBody), -- cgit v1.2.3