Closed Bug 1185558 Opened 9 years ago Closed 9 years ago

Implement "Service-Worker/script" header

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: bkelly, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

We need to implement step 4.6 to send "Service-Worker/script" header on the request:

  https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#update-algorithm
Blocks: ServiceWorkers-postv1
No longer blocks: ServiceWorkers-v1
Assignee: nobody → ehsan
Blocks: ServiceWorkers-v1
No longer blocks: ServiceWorkers-postv1
Comment on attachment 8677098 [details] [diff] [review]
Send a "Service-Worker: script" header when downloading service worker scripts

Review of attachment 8677098 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/workers/ServiceWorkerScriptCache.cpp
@@ +140,5 @@
>      if (httpChannel) {
>        // Spec says no redirects allowed for SW scripts.
>        httpChannel->SetRedirectionLimit(0);
> +
> +      httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Service-Worker"), NS_LITERAL_CSTRING("script"), false);

nit: Line length and please include a /* merge */ comment on the bare boolean.
Attachment #8677098 - Flags: review?(bkelly) → review+
https://hg.mozilla.org/mozilla-central/rev/da5aa8844048
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: