shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.21k stars 1.34k forks source link

Incorrect parsing of headers in MSIE #1172

Closed totoCZ closed 6 years ago

totoCZ commented 6 years ago

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 commented 6 years ago

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

michellezhuogg commented 6 years ago

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

totoCZ commented 6 years ago

Sure. This link is valid for 30 days. https://mgmt.cdn77-ivysilani.cz/play?token=&contentType=live&expiry=1515281018&id=2402&playerType=dash&quality=web&region=1&skipIpAddressCheck=true&userId=user_id

joeyparrish commented 6 years ago

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