Closed Bug 2076692 Opened 2 months ago Closed 25 days ago

Speculation-rules prefetch is used for a navigation that differs in a non-ASCII query key listed in No-Vary-Search `except`

Categories

(Core :: DOM: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: smayya, Assigned: acreskey)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged][fxpe])

Attachments

(1 external file, 1 obsolete file)

speculation-rules/prefetch/no-vary-search/prefetch-single.https.html?29-29 fails with the patches for bug 2070841:

Don't use the prefetched URL. Non-ASCII key - 2 UTF-8 code units. Vary the response on the non-ASCII key.: assert_equals: Navigation used the prefetched response! expected (undefined) undefined but got (string) "prefetch"

The prefetched response has No-Vary-Search: params, except=("%C2%A2"). The prefetch uses ?¢=3 and the navigation uses ?¢=4, so the URLs differ in the one key that must not be ignored, and the prefetch should not be used. The navigation matches it anyway, which suggests the except key isn't compared correctly when it's a percent-encoded non-ASCII key.

https://wpt.fyi/results/speculation-rules/prefetch/no-vary-search?label=master&label=experimental&aligned&q=prefetch-single.https.html

Severity: -- → S3
Priority: -- → P3
Whiteboard: [necko-triaged]
See Also: → 2080083
Assignee: nobody → acreskey
Whiteboard: [necko-triaged] → [necko-triaged][fxpe]

The same patch will fix all three of these

prefetch-single.https.html?27-27
prefetch-single.https.html?28-28
prefetch-single.https.html?29-29

Query names were decoded but header keys weren't, so encoded keys like "%C2%A2" never matched (draft section 5.3).

Attachment #9667970 - Attachment is obsolete: true
Pushed by acreskey@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c64a2ed5bf57 https://hg.mozilla.org/integration/autoland/rev/2a95bcbbd5f6 Percent-decode No-Vary-Search header keys before matching query params. r=sunil,necko-reviewers,jesup
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/4087808b7bb3 https://hg.mozilla.org/integration/autoland/rev/6bbff16df05d Revert "Bug 2076692 - Percent-decode No-Vary-Search header keys before matching query params. r=sunil,necko-reviewers,jesup" for causing wpt failures in prefetch-single.https.html.
Attachment #9668038 - Attachment description: Bug 2076692 - Percent-decode No-Vary-Search header keys before matching query params. r?#necko-reviewers,sunil! → Bug 2076692 - Percent-decode No-Vary-Search header keys before matching query params. r=sunil,necko-reviewers,jesup
Pushed by acreskey@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2c2ba5f95abc https://hg.mozilla.org/integration/autoland/rev/151e8df4dc2e Percent-decode No-Vary-Search header keys before matching query params. r=sunil,necko-reviewers,jesup
Status: NEW → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: