mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
enforce utf8 on more file reads
This commit is contained in:
parent
193df5c8d3
commit
6a6ef63775
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue