mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-03 06:17:53 +10:00
enforce utf8 on more file reads
This commit is contained in:
@@ -201,7 +201,7 @@ class Snapshot(models.Model):
|
||||
@cached_property
|
||||
def headers(self) -> Optional[dict]:
|
||||
try:
|
||||
return json.loads((Path(self.link_dir) / 'headers.json').read_text().strip())
|
||||
return json.loads((Path(self.link_dir) / 'headers.json').read_text(encoding='utf-8').strip())
|
||||
except Exception:
|
||||
pass
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user