[Webkit-unassigned] [Bug 170849] New: A blob created from a fetch response does not correctly get type set
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 14 09:22:01 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=170849
Bug ID: 170849
Summary: A blob created from a fetch response does not
correctly get type set
Product: WebKit
Version: Safari 10
Hardware: Macintosh
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: Platform
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dahjelle.webkit.org at thehjellejar.com
In Safari 10.1 on macOS 10.12.4 (and I believe on iOS as well), the following code shows an empty content-type, rather than 'text/html' as I would expect and as Chrome/Firefox do.
```
var output = document.querySelector('span');
fetch('https://enable-cors.org/').then(function(response) {
return response.blob();
}).then(function(blob) {
output.innerText = "'" + blob.type + "'";
}).catch(function(error) {
output.innerText = 'Error: ' + error.message;
console.log(error);
});
```
See a runnable version at https://jsbin.com/hubope/edit?js,output.
While this sounds like 161228, which is marked as fixed last year, it's a problem in the most recent version of Safari. 137647 sounds similar, too, but was about XHR and not the Fetch API.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170414/5332208d/attachment.html>
More information about the webkit-unassigned
mailing list