Re: [fetch] Handling of empty bodies (#246)

I'm not sure I understand the rest of your answer (and I had missed that the question applies to `Request` objects as well).

To clarify my question, is the behavior described below intentional. Or is it unintentional and should be changed. Or is my reading of the specification wrong.

* `new Response(new URLSearchParams())` results in a `content-type: application/x-www-form-urlencoded;charset=UTF-8` header added. No `content-length` header is added.
* `new Response("")` results in a `content-type: text/plain;charset=UTF-8` header added. No `content-length` header is added.
* `new Request(new URLSearchParams())` results in a `content-type: application/x-www-form-urlencoded;charset=UTF-8` header added. No `content-length` header is added to the Request object, but `content-length: 0` is added if the request is sent over the network.
* `new Request("")` results in a `content-type: text/plain;charset=UTF-8` header added. No `content-length` header is added to the Request object, but `content-length: 0` is added if the request is sent over the network.


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/246#issuecomment-196196787

Received on Monday, 14 March 2016 08:22:12 UTC