Re: [whatwg/fetch] Should Body.formData() always strip the BOM? (#650)

> Are you only talking about stripping an initial BOM and not for name/value? https://url.spec.whatwg.org/#urlencoded-parsing doesn't do such a thing, though we could consider changing how it works I suppose.

Your question made me realize my description was biased by the way the code currently works in Blink. I was indeed only talking about the initial BOM, but only because we're not doing https://url.spec.whatwg.org/#urlencoded-parsing properly in `Body.formData()` (we're essentially [UTF-8 decoding](https://encoding.spec.whatwg.org/#utf-8-decode) everything first and then doing the rest).

The only thing I have in mind now is whether there needs to be some sort of consistency:
* `Body.json()`: whether the BOM is preserved or not seems irrelevant.
* `Body.text()`: should it return the same data it received, BOM included, to match `Body.formData()`?

-- 
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/650#issuecomment-353064172

Received on Wednesday, 20 December 2017 13:34:41 UTC