diff options
Diffstat (limited to 'testing/web-platform/tests/service-workers/service-worker/resources/iso-latin1-header-worker.js')
-rw-r--r-- | testing/web-platform/tests/service-workers/service-worker/resources/iso-latin1-header-worker.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/service-workers/service-worker/resources/iso-latin1-header-worker.js b/testing/web-platform/tests/service-workers/service-worker/resources/iso-latin1-header-worker.js new file mode 100644 index 0000000000..d9ecca277b --- /dev/null +++ b/testing/web-platform/tests/service-workers/service-worker/resources/iso-latin1-header-worker.js @@ -0,0 +1,12 @@ +self.addEventListener('fetch', function(event) { + var url = event.request.url; + if (url.indexOf('sample?test') == -1) { + return; + } + + event.respondWith(new Promise(function(resolve) { + var headers = new Headers; + headers.append('TEST', 'ßÀ¿'); // header value holds the Latin1 (ISO8859-1) string. + resolve(new Response('hello world', {'headers': headers})); + })); + }); |