summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-11-21 15:05:26 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-11-21 15:05:26 +0100
commit8c75a5cc52605348df3718ea332e74c15fc0b358 (patch)
tree09056d6d40ac52e9695474a492726d63a78453f9
parent0baf56eb55ab99dceae218247057a0e57ea04057 (diff)
downloadcrocoite-8c75a5cc52605348df3718ea332e74c15fc0b358.tar.gz
crocoite-8c75a5cc52605348df3718ea332e74c15fc0b358.tar.bz2
crocoite-8c75a5cc52605348df3718ea332e74c15fc0b358.zip
Move base64 metadata into WARC header
-rw-r--r--crocoite/cli.py2
1 files changed, 1 insertions, 1 deletions
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),