Closed
Bug 1263469
Opened 9 years ago
Closed 9 years ago
FetchEvent.request.cache is not set correctly for non-fetch channels
Categories
(Core :: DOM: Service Workers, defect)
Core
DOM: Service Workers
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: bkelly, Assigned: bkelly)
References
(Blocks 1 open bug)
Details
(Whiteboard: btpp-active)
Attachments
(5 files)
1.74 KB,
patch
|
mayhemer
:
review+
|
Details | Diff | Splinter Review |
1.20 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
2.57 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
3.16 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
4.81 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
There is a mapping between our load flags and fetch RequestCache values. We convert from RequestCache to load flags when setting an explicit RequestCache value. We don't, however, translate the other way creating a Request from an nsIChannel. So non-fetch channels never produce any RequestCache values besides "default".
I think we should fix this.
Assignee | ||
Comment 1•9 years ago
|
||
This maintains the current behavior for explicitly set fetch cache modes, but will otherwise guess the cache mode from the load flags.
Attachment #8739796 -
Flags: review?(honzab.moz)
Assignee | ||
Comment 2•9 years ago
|
||
I will add a check for this in one of our tests that trigger a window refresh since we should get "no-cache" for those requests. Should get to that tomorrow.
Assignee | ||
Comment 3•9 years ago
|
||
Add a check for evt.request.cache to our current refresh test. This causes the test to time out without the P1 and pass with the P1.
Attachment #8739988 -
Flags: review?(ehsan)
Assignee | ||
Comment 4•9 years ago
|
||
Updated•9 years ago
|
Whiteboard: btpp-active
Assignee | ||
Comment 5•9 years ago
|
||
I will add a test for EventSource as well since its required to bypass the http cache.
Comment 6•9 years ago
|
||
Comment on attachment 8739988 [details] [diff] [review]
bug1263469_p2_test.patch
Review of attachment 8739988 [details] [diff] [review]:
-----------------------------------------------------------------
This is good, but it would be nice if you can add a web platform test for this. Either in addition or instead of this one. r=me.
Attachment #8739988 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 7•9 years ago
|
||
We discussed this at the service worker face-to-face and decided we should implement this:
https://github.com/slightlyoff/ServiceWorker/issues/875
Updated•9 years ago
|
Attachment #8739796 -
Flags: review?(honzab.moz) → review+
Assignee | ||
Comment 8•9 years ago
|
||
WPT version of test validating frame reload cache value. I'll look at writing a wpt EventSource test now. We don't test EventSource at all there.
Attachment #8741834 -
Flags: review?(ehsan)
Assignee | ||
Comment 9•9 years ago
|
||
Update our EventSource mochitest to check for cache.
Attachment #8741885 -
Flags: review?(ehsan)
Updated•9 years ago
|
Attachment #8741834 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 10•9 years ago
|
||
After much pain, this adds a wpt test case for EventSource.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b42011ab8f71
Attachment #8741920 -
Flags: review?(ehsan)
Updated•9 years ago
|
Attachment #8741885 -
Flags: review?(ehsan) → review+
Updated•9 years ago
|
Attachment #8741920 -
Flags: review?(ehsan) → review+
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c5ea46c9e9e9
https://hg.mozilla.org/integration/mozilla-inbound/rev/a908bea60e67
https://hg.mozilla.org/integration/mozilla-inbound/rev/afd297527888
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8392b3322a9
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d66f5a53c09
Comment 12•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c5ea46c9e9e9
https://hg.mozilla.org/mozilla-central/rev/a908bea60e67
https://hg.mozilla.org/mozilla-central/rev/afd297527888
https://hg.mozilla.org/mozilla-central/rev/a8392b3322a9
https://hg.mozilla.org/mozilla-central/rev/6d66f5a53c09
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•