Repository navigation
Test when 304 responses alter a Vary header - #212
Draft
dfoxfranke wants to merge 2 commits into
Draft
dfoxfranke wants to merge 2 commits into
dfoxfranke wants to merge 2 commits into
Conversation
This helps with the vary-altered-by-304 tests. If a cache serves a plaintext body with Content-Encoding: gzip, we'll report a comprehensible failure message rather than just "terminated".
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR is follow-up to the HTTP WG thread at https://lists.w3.org/Archives/Public/ietf-http-wg/2026OctDec/0030.html. It tests a cache's behavior when the cache has a stale stored response which could be freshened according to §4.3.4 on the basis of a weak validator match, but the 304 response has a conflicting
Varyheader which makes the stored body unsuitable for answering the client's request.It also adds an optimality test to see if a cache will use a weak Last-Modified timestamp to revalidate a stale response when the client's request is unconditional. This is a dependency for one of the Vary tests.
TODO before I move this out of draft status:
Make it possible to actually get a passing result. Correct implementations (of which there aren't any at present) can't satisfy the request without a retry, so they'll appear as ↺ rather than ✓, and the test will end before it has fully verified that the final response to the client is correct. Fixing this will require improvements to the test harness.
Fix flakiness in the optimality test. Currently it sends
['Last-Modified', 0]and then['Last-Modified', -3]three seconds later and expects this to be same value, but due to processing delays it occasionally won't be. I need to add amagic_lmoption analogousmagic_ims.Catch caches that cheat on this test by ignoring
no-transformand compressing the stored body.Add some discussion and spec references.