Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing of headers in MSIE #1172

Closed
totoCZ opened this issue Dec 6, 2017 · 4 comments
Closed

Incorrect parsing of headers in MSIE #1172

totoCZ opened this issue Dec 6, 2017 · 4 comments
Assignees
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@totoCZ
Copy link

totoCZ commented Dec 6, 2017

Hi,

this is probably a bug in IE(?) but we observed the following issue when parsing the Content-Type header in IE which causes shaka to fail when the playlist doesn't have an extension:
pasted image at 2017_12_06 11_50 am

It seems some random newlines are inserted to getAllResponseHeaders() in MSIE:

shaka-player/lib/net/http_plugin.js should filter empty lines to parse it correctly, otherwise we end up with shaka.util.Error.Code.UNABLE_TO_GUESS_MANIFEST_TYPE in shaka-player/lib/media/manifest_parser.js

Relevant issue may be:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/5403401/

IE 11.674 / Win 10 x64

@totoCZ
Copy link
Author

totoCZ commented Dec 6, 2017

We workarounded around this by changing all[header[0].toLowerCase() to all[header[0].toLowerCase().trim()

@michellezhuogg michellezhuogg added type: bug Something isn't working correctly flag: good first issue This might be a relatively easy issue; good for new contributors labels Dec 7, 2017
@michellezhuogg
Copy link
Contributor

Could you please add a manifest URL that reproduces the issue?

@michellezhuogg michellezhuogg added needs triage and removed type: bug Something isn't working correctly labels Dec 7, 2017
@totoCZ
Copy link
Author

totoCZ commented Dec 7, 2017

@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed needs triage labels Dec 11, 2017
@joeyparrish joeyparrish added this to the v2.3.0 milestone Dec 11, 2017
joeyparrish pushed a commit that referenced this issue Dec 18, 2017
Since IE/Edge returns the header with a leading new line('\n'), we need
to remove it from the response.

Closes #1172.

Change-Id: I133f9cfbada6486edc438f3dcbc37c7c78dbf36c
@joeyparrish
Copy link
Member

The fix has been cherry-picked for v2.2.9.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants