1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13

content / test / data / fetch_event_octet_stream.js [blame]

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

self.addEventListener('fetch', e => {
  const headers = new Headers();
  const filename = 'octet-stream.abc';
  headers.append('Content-Type', 'application/octet-stream; charset=UTF-8');
  headers.append('Content-Disposition',
                 'attachment; filename="' + filename +
                 '"; filename*=UTF-8\'\'' + filename);
  e.respondWith(new Response('This is a binary', {headers}));
});