Closed Bug 1532303 Opened 2 years ago Closed 2 years ago

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

Categories

(Core :: DOM: Service Workers, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: ytausky, Assigned: ytausky)

References

(Blocks 1 open bug)

Details

(Keywords: compat)

Attachments

(1 file)

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: 2 years 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.