Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 self.addEventListener('fetch', event => { | |
| 2 if (!event.request.url.match(/body-stream-with-invalid-chunk$/)) | |
| 3 return; | |
| 4 const stream = new ReadableStream({start: controller => { | |
| 5 // The argument is intentionally a string, not a Uint8Array. | |
| 6 controller.enqueue('hello'); | |
| 7 }}); | |
| 8 const headers = { 'x-content-type-options': 'nosniff' }; | |
| 9 event.respondWith(new Response(stream, { headers })); | |
| 10 }); | |
| OLD | NEW |