From bf08dd3b8a981da860d532c98d04db932fce7c4d Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 3 Dec 2017 10:18:32 +0100 Subject: Fix UTF-8 encoding name HTMLSerializer uses the exact string given in , thus it should be with hyphen. --- crocoite/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crocoite') diff --git a/crocoite/cli.py b/crocoite/cli.py index e7ed3db..52d3b27 100644 --- a/crocoite/cli.py +++ b/crocoite/cli.py @@ -75,7 +75,7 @@ def main (): serializer = HTMLSerializer () httpHeaders = StatusAndHeaders('200 OK', {}, protocol='HTTP/1.1') record = writer.create_warc_record (doc['documentURL'], 'response', - payload=BytesIO (serializer.render (stream, 'utf8')), + payload=BytesIO (serializer.render (stream, 'utf-8')), http_headers=httpHeaders, warc_headers_dict={'X-DOM-Snapshot': str (True), 'X-Chrome-Viewport': viewport}) -- cgit v1.2.3