Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
surykatka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
surykatka
Commits
36d54758
Commit
36d54758
authored
Jun 14, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HTTP: stop checking Expires header
This header is dropped by some CDN when getting a cache hit
parent
8a4769fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/surykatka/http.py
src/surykatka/http.py
+3
-2
tests/test_http.py
tests/test_http.py
+0
-1
No files found.
src/surykatka/http.py
View file @
36d54758
...
@@ -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
)
...
...
tests/test_http.py
View file @
36d54758
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment