diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-12-03 10:18:32 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2017-12-03 10:18:32 +0100 |
commit | bf08dd3b8a981da860d532c98d04db932fce7c4d (patch) | |
tree | e7501771e5c63298f8ff55c8da3e926cdd83fd63 | |
parent | a1aa7b1fe501476b78f4413ff813ad2f40546b7c (diff) | |
download | crocoite-bf08dd3b8a981da860d532c98d04db932fce7c4d.tar.gz crocoite-bf08dd3b8a981da860d532c98d04db932fce7c4d.tar.bz2 crocoite-bf08dd3b8a981da860d532c98d04db932fce7c4d.zip |
Fix UTF-8 encoding name
HTMLSerializer uses the exact string given in <meta charset=X>, thus it
should be with hyphen.
-rw-r--r-- | crocoite/cli.py | 2 |
1 files changed, 1 insertions, 1 deletions
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}) |