[Webkit-unassigned] [Bug 159210] New: Empty Content-Type header sent when uploading a file using XMLHttpRequest and type-less Blob
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 28 05:00:29 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=159210
Bug ID: 159210
Summary: Empty Content-Type header sent when uploading a file
using XMLHttpRequest and type-less Blob
Classification: Unclassified
Product: WebKit
Version: Safari 9
Hardware: iOS
OS: OS X 10.11
Status: NEW
Severity: Normal
Priority: P2
Component: XML
Assignee: webkit-unassigned at lists.webkit.org
Reporter: Russiandevil at gmail.com
In my Javascript application I upload files to Amazon S3 bucket using XMLHttpRequests using type-less blobs
e.g. var myTypeLessBlob = new window.Blob([some Uint8Array of data]).
The reason I'm not specifying a Content-Type (instead of using, say, application/octet-stream or binary/octet-stream,
which is what this data is technically) is because I need to support a legacy (cannot modify the code of) version of
Java application which fetches these uploaded documents later, and S3 expects the Content-Type header value that was
specified during upload to be the same during download later - and the legacy app doesn't specify Content-Type during
its uploads or downloads.
Anywho, this type-less blob approach for upload and subsequent download seems to work fine for me in Chrome, Firefox, IE11,
Microsoft Edge. That is, the Content-Type header does not get sent in a PUT request to the server and later on when I download
the document it's the Amazon S3 that tells me that its in fact binary/octet-stream in its response header.
However when using Safari, I noticed that for some reason the Content-Type header gets sent as an empty string
during upload - which results in the same behaviour during the subsequent download, which causes issues when I
try to download my Safari-uploaded file in those other browsers.
Is there some reason Safari/Webkit is behaving differently to other browsers in this regard?
cheers,
Greg
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160628/792a879e/attachment.html>
More information about the webkit-unassigned
mailing list