This repository was archived by the owner on Aug 26, 2022. It is now read-only.
bug 1431259: caching headers/tests for health views#4677
Merged
escattone merged 2 commits intomdn:masterfrom Feb 23, 2018
escattone:cache-control-headers-health-1431259
Merged
bug 1431259: caching headers/tests for health views#4677escattone merged 2 commits intomdn:masterfrom escattone:cache-control-headers-health-1431259
escattone merged 2 commits intomdn:masterfrom
escattone:cache-control-headers-health-1431259
Conversation
jwhitlock
approved these changes
Feb 23, 2018
| response = getattr(client, http_method)(url) | ||
| assert response.status_code == 405 | ||
| assert 'Cache-Control' in response | ||
| assert 'max-age=0' in response['Cache-Control'] |
Contributor
There was a problem hiding this comment.
Nit: If the Cache-Control header is missing, then checking for max-age=0 will also fail, so checking for Cache-Control is redundant.
Contributor
|
This looks good and works well on my development machine, using The same nit on a redundant check for the |
Codecov Report
@@ Coverage Diff @@
## master #4677 +/- ##
==========================================
+ Coverage 95.27% 95.27% +<.01%
==========================================
Files 261 261
Lines 23560 23579 +19
Branches 1691 1691
==========================================
+ Hits 22447 22466 +19
Misses 902 902
Partials 211 211
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another in a series of PR's that add the appropriate caching headers and related tests to all Kuma endpoints as part of the effort of placing a CDN in front of MDN. This PR adds caching headers and tests for the
kuma.health.urls.