Re: [whatwg/fetch] Is a missing HeadersInit treated differently from an empty one? (#479)

> So we count { headers: undefined } as not present, right?

Well, that depends on what you mean by "we".

If you do `new Headers(undefined)` that is the same as doing `new Headers({})`.  And https://github.com/heycam/webidl/issues/76 is all about how this _should_ behave.

But at the moment per the IDL spec `{ headers: undefined }` and `{}` are required to have the same behavior as each other.  And `{ headers: null }` and `{ headers: {} }` are likewise required to have the same behavior as each other.  But the two behaviors are not required to be identical (again, at the moment), and the fetch spec in fact defines them to be quite wildly different as far as I can tell.  Or at least making them both behave like `{ headers; {} }` fails a whole bunch of fetch and serviceworker tests quite spectacularly.

-- 
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/479#issuecomment-278021002

Received on Tuesday, 7 February 2017 14:49:02 UTC