Resolve failure of WPT /service-workers/service-worker/Service-Worker-Allowed-header.https.html

RESOLVED FIXED in Firefox 67

Status

()

defect
P2
normal
RESOLVED FIXED
5 months ago
2 months ago

People

(Reporter: ytausky, Assigned: ytausky)

Tracking

(Blocks 1 bug, {compat})

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Two test cases in this suite fail, both involve a Service-Worker-Allowed header whose origin is different than the page's. As far as I can tell from the Update algorithm's step 9, substeps 8-18, only the URL's path is involved in determining whether a given scope can be controlled by the service worker, so Gecko indeed handles this case wrong.

The spec mandates that only the paths of the URIs resulting from evaluation
of the Service-Worker-Allowed header and the registration's scope be compared,
yet Gecko also includes the origin in the comparison. This commit makes Gecko
follow the spec.

Priority: -- → P2
Pushed by ytausky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51a634029b44
Fix evaluation of Service-Worker-Allowed header r=perry,asuth
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Spec behavior is likely changing in https://github.com/w3c/ServiceWorker/issues/1307 under PR https://github.com/w3c/ServiceWorker/pull/1409 to conform to our pre-patch behavior.

Yaron, do you think we should revert the (non-meta parts of the) patch, or refine the post-patch logic?

Flags: needinfo?(ytausky)

We could probably just revert it. It wasn't a complicated change.

Flags: needinfo?(ytausky)
You need to log in before you can comment on or make changes to this bug.