Closed
Bug 1121157
Opened 9 years ago
Closed 9 years ago
Fetch API: Add tests to check request's context on intercepted requests.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
People
(Reporter: nsm, Assigned: ehsan.akhgari)
References
Details
Requests sent via fetch events to a ServiceWorker should have the correct context set on them. It is impossible to test this until Bug 1065216 and Bug 1113555 have landed, so wait on them.
Reporter | ||
Updated•9 years ago
|
Blocks: ServiceWorkers-v1
Assignee | ||
Comment 1•9 years ago
|
||
Why does Request.context reflect Request::mContext, and not InternalRequest::mContentPolicyType? It seems that the Request objects intercepted in FetchEvent should always have the wrong context attribute because of this (unless the request is coming from fetch).
Flags: needinfo?(nsm.nikhil)
Reporter | ||
Comment 2•9 years ago
|
||
We don't have code that maps from the channel's policy type + originating node and other factors to a valid context and context frame type as specified in the fetch spec. In addition our nsIContentPolicyType does not map onto the full set of contexts specified in the spec. Yes, by default Requests intercepted by SW will have context 'fetch' even if they don't come from fetch. A minimum fix would be to have FetchEventRunnable::Init() at least set the correct type on the InternalRequest as grabbed from the channel. The spec fix so that JS observes the right context needs someone to put in the work to come up with this mapping, including being aware of any subtleties.
Flags: needinfo?(nsm.nikhil)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•