1 self.addEventListener('fetch', function(event) {
2 var url = event.request.url;
3 if (url.indexOf('dummy?test') == -1) {
6 event.respondWith(new Promise(function(resolve) {
7 var headers = new Headers;
8 headers.append('foo', 'foo');
9 headers.append('foo', 'b\0r'); // header value with a null byte
10 resolve(new Response('hello world', {'headers': headers}));