Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fetch/content-length/too-long.window.html - WPT Dashboard Interop Dashboard
promise_test(async t => {
const result = await fetch(`resources/content-length.py?length=${encodeURIComponent("Content-Length: 50")}`);
await promise_rejects_js(t, TypeError, result.text());
}, "Content-Length header value of network response exceeds response body");