From 4d6ea0f6cc2b8758be8f8a817b2bf7ee7732743e Mon Sep 17 00:00:00 2001 From: amy wieliczka Date: Mon, 30 Sep 2024 13:56:12 -0700 Subject: [PATCH] Relax content cache: require ETag OR Last-Modified, not both --- content_harvester/by_record.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content_harvester/by_record.py b/content_harvester/by_record.py index 8ce95b67..83bd67a4 100644 --- a/content_harvester/by_record.py +++ b/content_harvester/by_record.py @@ -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, "