Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fetch/api/basic/header-value-null-byte.any.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/header-value-null-byte.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/header-value-null-byte.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /fetch/api/basic/header-value-null-byte.any.worker.html - WPT Dashboard Interop Dashboard
// META: global=window,worker
promise_test(t => {
return promise_rejects_js(t, TypeError, fetch("../../../xhr/resources/parse-headers.py?my-custom-header="+encodeURIComponent("x\0x")));
}, "Ensure fetch() rejects null bytes in headers");