-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix when using Data URIs for the manifest #550
Conversation
Looks good to me. Thanks for the patch! Could you please update the tests in test/net/data_uri_plugin_unit.js to reflect this? There's already one that involves a MIME type, so the |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
…e header response
CLAs look good, thanks! |
Updated the tests so it checks for the response header. When no content type is present in the uri, an empty string is returned as the |
I think an empty string or null is appropriate. I wouldn't fill in defaults for content-type if the underlying transport doesn't have a MIME type concept. It might lead to confusion later. |
Everything looks good to me. I'll run it through the build bot. |
Testing in progress... |
All tests passed! |
Thank you for your contribution! |
* Fix when using Data URIs for the manifest * update test/net/data_uri_plugin_unit.js to test Data URIs content-type header response
* Fix when using Data URIs for the manifest * update test/net/data_uri_plugin_unit.js to test Data URIs content-type header response
When using Data URIs for the manifest an
UNABLE_TO_GUESS_MANIFEST_TYPE
is thrown. The mimeType is used to look up the manifesst parser but mimeType isundefined
becauseshaka.net.DataUriPlugin
does not return the correct 'content-type' in the header.With this change
shaka.media.ManifestParser
(lib/media/manifest_parser.js, line167) can select the manifest parser correctly.Data URIs used:
and