[whatwg/fetch] Mismatch between body length and user provided content-length header. (#1281)

I don't think the spec handles the case where there is a mismatch between body length and user provided content-length header.

In https://github.com/nodejs/undici we throw and error and kill the connection in this case.

However node-fetch seems to infer that this should be possible, https://github.com/node-fetch/node-fetch/blob/main/test/main.js#L921.

What is the correct behavior for fetch?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1281

Received on Monday, 9 August 2021 11:51:37 UTC