Bug 1288915 - Part 2: Verify that synthetic download works with a Content-Encoding header set. r=jdm, a=sledru
authorBen Kelly <ben@wanderview.com>
Thu, 28 Jul 2016 15:51:51 -0400
changeset 340148 ef0e06a0e51afd014ba6f880f686dbb1c3a00272
parent 340147 bfb16f4837b7c239a181f317e79ed9ac79b31c87
child 340149 de2e1b678ebdf59843d0438cedf893cc8e3df132
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm, sledru
bugs1288915
milestone49.0a2
Bug 1288915 - Part 2: Verify that synthetic download works with a Content-Encoding header set. r=jdm, a=sledru
dom/workers/test/serviceworkers/download/worker.js
--- a/dom/workers/test/serviceworkers/download/worker.js
+++ b/dom/workers/test/serviceworkers/download/worker.js
@@ -16,13 +16,15 @@ addEventListener('fetch', function(evt) 
   if (evt.request.url.indexOf('fake_download') === -1) {
     return;
   }
 
   // We should only get a single download fetch event. Automatically unregister.
   evt.respondWith(registration.unregister().then(function() {
     return new Response('service worker generated download', {
       headers: {
-        'Content-Disposition': 'attachment; filename="fake_download.bin"'
+        'Content-Disposition': 'attachment; filename="fake_download.bin"',
+        // fake encoding header that should have no effect
+        'Content-Encoding': 'gzip',
       }
     });
   }));
 });