EventSource should set INHIBIT_CACHING to use "no-store" caching mode as required in spec

RESOLVED FIXED in Firefox 60

Status

()

enhancement
RESOLVED FIXED
a year ago
2 months ago

People

(Reporter: bkelly, Assigned: bkelly)

Tracking

unspecified
mozilla60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

In bug 1437080 I am fixing how we report our FetchEvent.request.cache values.  As a result it is now evident that we are not setting the right flags to match the spec'd "no-store" cache mode.  We not only need to bypass the cache, but we need to avoid populating the cache as well.  So lets set INHIBIT_CACHING.
Boris, step 11 here says we should be using "no-store" cache mode for EventSource requests:

https://html.spec.whatwg.org/#dom-eventsource

The "no-store" fetch cache mode maps to LOAD_BYPASS_CACHE and INHIBIT_CACHING in necko:

https://searchfox.org/mozilla-central/rev/a5abf843f8fac8530aa5de6fb40e16547bb4a47a/netwerk/protocol/http/HttpBaseChannel.cpp#2854

EventSource only uses LOAD_BYPASS_CACHE, though.  We have tests to check for no-store, but they are confused by bug 1437080.

This patch adds the INHIBIT_CACHING flag to the EventSource nsIChannel load flags.
Attachment #8949806 - Flags: review?(bzbarsky)
Comment on attachment 8949806 [details] [diff] [review]
Make EventSource set INHIBIT_CACHING to match spec required "no-store" cache mode. r=bz

r=me
Attachment #8949806 - Flags: review?(bzbarsky) → review+

Comment 3

a year ago
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/03ad1b3810f1
Make EventSource set INHIBIT_CACHING to match spec required "no-store" cache mode. r=bz

Comment 4

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/03ad1b3810f1
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.