Merge lp:~cjwatson/isitdeployable/version-no-cache into lp:isitdeployable

Proposed by Colin Watson
Status: Merged
Approved by: Daniel Manrique
Approved revision: 302
Merge reported by: Otto Co-Pilot
Merged at revision: 303
Proposed branch: lp:~cjwatson/isitdeployable/version-no-cache
Merge into: lp:isitdeployable
Diff against target: 11 lines (+1/-0)
1 file modified
revtracker/tasks.py (+1/-0)
To merge this branch: bzr merge lp:~cjwatson/isitdeployable/version-no-cache
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+400038@code.launchpad.net

Commit message

Send "Pragma: no-cache" when checking version header.

Description of the change

Some sites (e.g. qastaging.launchpad.net) are behind a cache that may require some help to notice when the version header changes. Make some effort to avoid this.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

+1!

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

Necro-merging, I hope it doesn't break anything :)

Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :
Revision history for this message
Daniel Manrique (roadmr) wrote :

The day of reckoning is here, ols-jenkaas. Test not. Merge or merge not. There is no test.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'revtracker/tasks.py'
2--- revtracker/tasks.py 2020-04-21 21:46:42 +0000
3+++ revtracker/tasks.py 2021-03-23 13:38:07 +0000
4@@ -682,6 +682,7 @@
5 try:
6 headers = requests.utils.default_headers()
7 headers['user-agent'] += " (isitdeployable)"
8+ headers["pragma"] = "no-cache"
9 response = requests.head(info_url, headers=headers, timeout=2)
10 response.raise_for_status()
11 except (MissingSchema,

Subscribers

People subscribed via source and target branches