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