w3c / w3c/ServiceWorker

respondWith uses the wrong targetRealm

Open
#1,055 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

apr-2017-f2f-v1
Dominant language
Bikeshed
Stars
3.6k
Forks
324
Avg merge
14d 22h
Merged PRs (30d)
1

Description

Since 6c2b3f18c5aad509635bd81f4931132c26514bb6 both FetchEvent.respondWith and ForeignFetchEvent.respondWith say

   1. Let |targetRealm| be the <a>relevant Realm</a> of the <a>context object</a>.

But the relevant Realm of the context object is always going to be the service worker itself, isn't it?

It looks like targetRealm should be 'event.request's request's client's Realm.'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the FetchEvent.respondWith and ForeignFetchEvent.respondWith algorithms, then compare their targetRealm steps with the cited relevant Realm definition in the HTML specification. Confirm whether the target should be event.request's request's client's Realm and update both algorithms consistently; done means the specification no longer assigns the service worker's Realm incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.