Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax content cache: require ETag OR Last-Modified, not both #1116

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content_harvester/by_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def check_component_cache(
# Do a head request to get the current ETag and
# Last-Modified values, used to create a cache key
head_resp = http_session.head(**asdict(request))
if (
not head_resp.headers.get('ETag') or
not head_resp.headers.get('Last-Modified')
if not (
head_resp.headers.get('ETag') or
head_resp.headers.get('Last-Modified')
):
print(
f"{component_type}: No ETag or Last-Modified headers, "
Expand Down
Loading