[wpt-sync] Sync PR 62978 - [compression-dictionary] Test how Cache-Control affects dictionary freshness
Categories
(Core :: DOM: Networking, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62978 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62978
Details from upstream follow.
Aadharsh Pannirselvam <19518661+oddharsh@users.noreply.github.com> wrote:
[compression-dictionary] Test how Cache-Control affects dictionary freshness
RFC 9842 §2.2.1 says a dictionary has to be "either fresh or allowed to be served stale" to match. The suite currently covers two freshness cases, an expired dictionary and
max-age=0, becauseregister-dictionary.pycan only sendCache-Control: max-age=N. The directives that decide whether a stale response may be served had no coverage at all.This PR adds an optional
cache-controlparameter toregister-dictionary.pythat replaces the default header, plus six tests:
test Cache-Controlexpected basis Stale dictionary within its stale-while-revalidate window is used max-age=0, stale-while-revalidate=3600used RFC 5861 Dictionary past its stale-while-revalidate window is not used max-age=0, stale-while-revalidate=5+Age: 10not used RFC 5861 Fresh dictionary with must-revalidate is used max-age=3600, must-revalidateused RFC 9111 §5.2.2.2 only restricts stale use Stale dictionary with must-revalidate is not used max-age=0, must-revalidate, stale-while-revalidate=3600not used RFC 9111 §5.2.2.2 Dictionary with no-cache is not used max-age=3600, no-cachenot used RFC 9111 §5.2.2.4 Dictionary with no-store is not registered max-age=3600, no-storenot used RFC 9111 §5.2.2.5 The negative tests follow the existing pattern: they match on
echo-headers.pyand wait onregisterAltDictionaryAndWait. The past-the-window case uses the existingageparameter, so there are no sleeps.One judgment call worth a look:
no-cache. Amax-age=3600, no-cacheresponse is fresh, but it can't be reused without validation. I read that as not satisfying §2.2.1, and Chrome agrees (it doesn't register one). If the intent is that a dictionary only needs to be fresh, that test should flip.Testing. All 22 tests in the file pass in Chrome 154.0.8037.58 (three runs) and Canary 156.0.8073.3. Each new test was also checked against a mutated handler, to confirm it can fail:
- with the
cache-controlparameter ignored (so everything getsmax-age=3600), the four negative tests fail;- with
no-storeprepended, the two positive tests fail.A note for anyone running this directory locally with
wpt serveinstead of wptrunner: Chrome drops shared dictionaries when the certificate doesn't chain to a known root, except on localhost (kCompressionDictionaryTransportRequireKnownRootCert, on by default). Under the wpt CA every test in the file fails, including "Simple dictionary registration", and DevTools reports nothing.--disable-features=CompressionDictionaryTransportRequireKnownRootCertfixes it.cc @pmeenan @fred-wang
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=99803
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 8 tests and 8 subtests
Status Summary
Firefox
OK : 8
PASS : 33
FAIL : 6
Chrome
OK : 8
PASS : 39
Safari
OK : 7
PASS : 7
FAIL : 31
TIMEOUT: 2
Links
Details
New Tests That Don't Pass
- /fetch/compression-dictionary/dictionary-fetch-timing-001.tentative.https.html [wpt.fyi]
- Timing of compression dictionary fetches for <link> element and Link header.:
FAIL(Chrome:PASS, Safari:TIMEOUT)
- Timing of compression dictionary fetches for <link> element and Link header.:
- /fetch/compression-dictionary/dictionary-fetch-timing-002.tentative.https.html [wpt.fyi]
- <link rel=compression-dictionary> are fetched after DOM operations.:
FAIL(Chrome:PASS, Safari:FAIL)
- <link rel=compression-dictionary> are fetched after DOM operations.:
- /fetch/compression-dictionary/dictionary-registration.tentative.https.html [wpt.fyi]
- Dictionary with 1025 character dictionary ID is not registered:
FAIL(Chrome:PASS, Safari:FAIL) - Stale dictionary within its stale-while-revalidate window is used:
FAIL(Chrome:PASS, Safari:FAIL) - Dictionary with no-cache is not used:
FAIL(Chrome:PASS, Safari:FAIL) - Dictionary registration with dictionary ID (valid characters and backslash escaping):
FAIL(Chrome:PASS, Safari:FAIL)
- Dictionary with 1025 character dictionary ID is not registered:
https://hg.mozilla.org/mozilla-central/rev/0bd6ac4a742d
https://hg.mozilla.org/mozilla-central/rev/805c668fcc06
Description
•