diff options
Diffstat (limited to 'testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js')
-rw-r--r-- | testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js b/testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js new file mode 100644 index 0000000000..741d83bf7a --- /dev/null +++ b/testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js @@ -0,0 +1,5 @@ +// 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"); |