Commit 36d54758 authored by Romain Courteaud's avatar Romain Courteaud

HTTP: stop checking Expires header

This header is dropped by some CDN when getting a cache hit
parent 8a4769fb
...@@ -252,13 +252,14 @@ def checkHttpStatus( ...@@ -252,13 +252,14 @@ def checkHttpStatus(
header_dict[header_key] = header_value header_dict[header_key] = header_value
# Store key only, because of non stability # Store key only, because of non stability
# 'Etag', 'Last-Modified', 'Set-Cookie', 'Date', 'Age', 'Expires' # 'Etag', 'Last-Modified', 'Set-Cookie', 'Date', 'Age'
key_only_header_list = [ key_only_header_list = [
"Etag", "Etag",
"Last-Modified", "Last-Modified",
"Set-Cookie", "Set-Cookie",
"Age", "Age",
"Expires", # Expires is dropped by some CDN when getting a cache hit
# "Expires",
] ]
for header_key in key_only_header_list: for header_key in key_only_header_list:
header_value = response.headers.get(header_key, None) header_value = response.headers.get(header_key, None)
......
...@@ -1029,7 +1029,6 @@ class SurykatkaHttpTestCase(unittest.TestCase): ...@@ -1029,7 +1029,6 @@ class SurykatkaHttpTestCase(unittest.TestCase):
"Last-Modified", "Last-Modified",
"Set-Cookie", "Set-Cookie",
"Age", "Age",
"Expires",
] ]
blacklist_header_list = [ blacklist_header_list = [
"Foo", "Foo",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment