gecko-dev/testing/web-platform/tests/fetch/api/basic/header-value-null-byte.any.js
Anne van Kesteren 5e6eac9cdc Bug 1486008 [wpt PR 10424] - XMLHttpRequest: response header value containing 0x00, a=testonly
Automatic update from web-platform-testsFetch/XHR: response header value containing 0x00

As discussed in https://github.com/whatwg/xhr/issues/165 these should turn the response into a network error.
--

wpt-commits: 3d172bc612e03a896b5611d9e9652f860995feef
wpt-pr: 10424
2018-08-31 10:29:21 +00:00

5 lines
244 B
JavaScript

// META: global=window,worker
promise_test(t => {
return promise_rejects(t, new TypeError(), fetch("../../../xhr/resources/parse-headers.py?my-custom-header="+encodeURIComponent("x\0x")));
}, "Ensure fetch() rejects null bytes in headers");