Fetch: IE 11 vs preProcessedHeaders.split(/\r?\n/)

Created on 16 Jan 2020  ·  16Comments  ·  Source: github/fetch

Hello devs, and thank you for this great polyfill.

I am facing a strange bug in IE 11 (on Browserstack, no access to and old Windows system).

In short, the behaviour of preProcessedHeaders.split(/\r?\n/).forEach(...) seem to be inconsistent between for instance Chrome's last version (my reference point) and IE11 on Browserstack.

IE 11 -> Incorrect
image

Chrome -> Correct
image

Meaning that the polyfill simply doesn't work for me on IE 11.

If you want to try yourself assuming you have an access to an IE 11 browser:

'preProcessedHeaders'.split(/\r?\n/)
'preProcessedHeaders\n'.split(/\r?\n/)
'preProcessedHeaders\r'.split(/\r?\n/)
'preProcessedHeaders\r\n'.split(/\r?\n/)

Is anyone able to reproduce this?

Thank you for your time in advance.

Note
Polyfill version: 3.0.0
Here is the IE11 build I tested with:
image

All 16 comments

The regular expression works for me in a newer patch version of IE 11, so this might be a bug in the older version Browserstack seems to be using.

Screen Shot 2020-01-24 at 08 42 49

Thank you for having taken the time to test! More tests from more people are welcome here, as it is nearly impossible to obtain information about IE11 builds market shares.
I will notify Browserstack about it, and if they provide me with any interesting information I'll add it in here for other people.

I'm running into the same thing on the newer version of IE 11 that was posted.

screenshot

@charlesbjohnson your version is exactly the same as mine. Edit: or do you simply confirm that you run into this issue too?

@charlesbjohnson your version is exactly the same as mine. Edit: or do you simply confirm that you run into this issue too?

Confirming that I'm running into this issue on the same version that you posted. I don't know how to confirm if this is the latest IE 11, but I downloaded it today from here.

Correction: My version is the same as @dgraham's (here), and not the version @pierremanceaux originally posted in the PR description.

Yeah, didn't find a way to confirm the build date either, but for everything I see, seems pretty recent to me, if not the last one. I would bet it is the last one because:

Seems like something is broken in IE11's last build...

@pierremanceaux I use a newer version it seems, see image.

image

Cant reproduce your problem but still have the problem in fetch:

image

Interesting @ansbar , so in your version, preProcessedHeaders\r\n'.split(/\r?\n/) would work fine?

@dgraham maybe we should re-open this issue?

preProcessedHeaders.split(/\r?\n/) works with your examples but not in my real life test.
For now I use:
preProcessedHeaders.split('\r\n')
which works.

Rambo

czw., 16 sty 2020, 18:21 użytkownik Pierre Manceaux <
[email protected]> napisał:

Hello devs, and thank you for this great polyfill.

I am facing a strange bug in IE 11 (on Browserstack, no access to and old
Windos system).

In short, the behaviour of preProcessedHeaders.split(/\r?\n/).forEach(...)
https://github.com/github/fetch/blob/master/fetch.js#L373 seem to be
inconsistent between for instance Chrome's last version (my reference
point) and IE11 on Browserstack.

IE 11 -> Incorrect
[image: image]
https://user-images.githubusercontent.com/4114535/72547076-32f95780-388c-11ea-91a2-7bbba7578442.png

Chrome -> Correct
[image: image]
https://user-images.githubusercontent.com/4114535/72547173-66d47d00-388c-11ea-9415-e46c0d4842c4.png

Meaning that the polyfill simply doesn't work for me on IE 11.

If you want to try yourself assuming you have an access to an IE 11
browser:

'preProcessedHeaders'.split(/\r?\n/)
'preProcessedHeaders\n'.split(/\r?\n/)
'preProcessedHeaders\r'.split(/\r?\n/)
'preProcessedHeaders\r\n'.split(/\r?\n/)

Is anyone able to reproduce this?

Thank you for your time in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/github/fetch/issues/748?email_source=notifications&email_token=AOJA5KB2EFWARH7VFFGSMYDQ6CJNXA5CNFSM4KHXUEEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IGWZBBA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOJA5KBMLCKDGUV4O3VSIU3Q6CJNXANCNFSM4KHXUEEA
.

The core-js ticket isn't getting any progress right now. Is there a way to work around this issue by not using the polyfilled regex and doing it a different way?

This project does not use core-js at all, the issue you are seeing is one from core-js itself I believe and not something in this project.

@JakeChampion we do know of the issue though and it's common to use core-js polyfills and this polyfill. If we can use different code that doesn't trigger the bug - surely that's a win?

@JakeChampion we do know of the issue though and it's common to use core-js polyfills and this polyfill. If we can use different code that doesn't trigger the bug - surely that's a win?

I'm happy to accept a pull-request for that change 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gkatsanos picture gkatsanos  ·  4Comments

javan picture javan  ·  3Comments

ccorcos picture ccorcos  ·  3Comments

indranildutta06 picture indranildutta06  ·  3Comments

seekcx picture seekcx  ·  4Comments