Bug 1288915 P2 Verify that synthetic download works with a Content-Encoding header set. r=jdm
authorBen Kelly <ben@wanderview.com>
Thu, 28 Jul 2016 15:51:51 -0400
changeset 349276 80b2d8a0999e03ef669bff6ddf7e628a26355b60
parent 349275 d480d30a74c30a6dc94b02e5bc20dee10285b10d
child 349277 fc2138a46d6c1e59649f0181807974605ace82ed
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs1288915
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288915 P2 Verify that synthetic download works with a Content-Encoding header set. r=jdm
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',
       }
     });
   }));
 });