WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
172873
Implement content sniffing for blob URLs
https://bugs.webkit.org/show_bug.cgi?id=172873
Summary
Implement content sniffing for blob URLs
Daniel Bates
Reported
2017-06-02 14:33:48 PDT
Following up from a conversation in <
https://github.com/w3c/FileAPI/issues/82
>, we should apply the MIME type sniffing algorithm when navigating to a blob URL. Currently we do not implement support for content sniffing for blob URLs. When navigating to a blob URL that does not have a type (content-type) we start a download because we do not apply the MIME type sniffing algorithm as part of step 4 of the "process a navigate response" algorithm in the HTML standard: <
https://html.spec.whatwg.org/#process-a-navigate-response
> (2 June 2017). Instead we should apply the MIME type sniffing algorithm. Note WebKit defers to the underlying network stack (CFNetwork) to implement content sniffing. Unless we move such content sniffing into WebCore, we may need new API/SPI to access the content sniffing algorithm in the underlying network stack. Example: Open a page with the following markup: <!DOCTYPE html> <html> <body> <script> var frame = document.createElement("iframe"); frame.src = URL.createObjectURL(new Blob(["<h1>Hello</h1>"])); document.body.appendChild(frame) </script> </body> </html> Then you should see "Hello" (rendered as HTML) in the frame. But in Safari Version 10.1 (12603.1.24) we initiate a download.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-06-02 14:34:11 PDT
<
rdar://problem/32544847
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug