jhiesey / stream-http

Streaming node http in the browser
MIT License
354 stars 62 forks source link

Trouble with headers in fetch polyfill #71

Closed tschaub closed 7 years ago

tschaub commented 7 years ago

I'm seeing issues on IE with a fetch polyfill that I think are due to the change in 11d14fc642f4878e9dc8e2329a62e7a8d18895fe.

Basically, headers is getting passed to fetch as an array of arrays, and the implementation is expecting that the forEach callback will be called with value, name.

The MDN docs suggest that the headers property is

a Headers object or an object literal with ByteString values.

I think the spec says that the headers property can be an array of arrays

typedef (sequence<sequence> or record<ByteString, ByteString>) HeadersInit

So I'm guessing that this is an issue with the polyfill instead of this module. But I'm curious if you can give some background on 11d14fc642f4878e9dc8e2329a62e7a8d18895fe.

tschaub commented 7 years ago

Issue with polyfill addressed in github/fetch#485.