Specify Data URL media-type as application/octet-stream when mimeType not available#220
Open
yezhizhen wants to merge 1 commit into
Open
Specify Data URL media-type as application/octet-stream when mimeType not available#220yezhizhen wants to merge 1 commit into
application/octet-stream when mimeType not available#220yezhizhen wants to merge 1 commit into
Conversation
…ype` not available
Member
Author
|
cc @xiaochengh |
pull Bot
pushed a commit
to AKJUS/servo
that referenced
this pull request
May 14, 2026
…m` for unspecified Blob type (servo#44897) We didn't produce valid RFC2397 format. Earlier, when Blob type is empty, we would produce `data:base64,...`, but the correct format should be `data:;base64,...` However, just doing that won't pass the test, as spec is not aligned with browser behaviours. All browsers follow the existing tests behaviour. I opened w3c/FileAPI#220. Testing: Passing `reading-data-section/filereader_readAsDataURL.any.js` for worker and main window. --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
Member
Author
|
Updated test for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While implementing FileAPI in Servo, servo/servo#44897
I notice we fail to pass some readAsDataURL WPT tests:
It seems that spec is not aligned with test expectations. WebKit, Chromium, Gecko would fallback to
application/octet-stream.Part of #104
Implementation commitment:
And Servo will do this from now on.
Preview | Diff