Skip to content

Commit

Permalink
Always compare headers in lower-case
Browse files Browse the repository at this point in the history
We can't currently depend on them already being lower-case: edgi-govdata-archiving/web-monitoring-db#1194
But hopefully in the future!
  • Loading branch information
Mr0grog committed Feb 14, 2025
1 parent b9ee485 commit edf5961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generate_task_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def maybe_bad_capture(version) -> bool:
These don't represent what a regular user should have seen at the time, so
we should avoid using them as candidates for comparison.
"""
headers = version['headers'] or {}
headers = {k.lower(): v for k, v in (version['headers'] or {}).items()}
content_length = version['content_length']
if content_length is None:
content_length = int(headers.get('content-length', '-1'))
Expand Down

0 comments on commit edf5961

Please sign in to comment.