On Nov 17, 2009, at 10:32 AM, Darin Fisher wrote:
On Tue, Nov 10, 2009 at 7:48 AM, Jonas Sicking <[email protected]>
wrote:
Yay!
On Tue, Nov 10, 2009 at 4:06 PM, Anne van Kesteren
<[email protected]> wrote:
>>>> WebKit presently supports sending File. It does not support
FileData
>>>> yet.
>>>
>>> Is Content-Type set to anything specific if the author has not
set it?
>>
>> // FIXME: Should we set a Content-Type if one is not set.
>>
>> ^^^ looks like it presently depends on the web page setting the C-
T header
>> manually :-/ I think that should be fixed to be based on the
system's
>> knowledge of the file's mime type.
>
> So far I have only added support for Blob (the new FileData) of
these two
> and set the Content-Type to application/octet-stream if not
provided by the
> Web author. Should I also add File and set the Content-Type to
> File.mediaType?
I definitely think so yes.
Agreed.
Same thing for the send() function.
On a separate note, is sending "application/octet-stream" really
better than simply sending no Content-Type header at all when sending
a Blob (or a File with empty mediaType)?
I think it is probably wise to default to sending a content type
that explicitly says "i don't know the type" on the grounds that
being explicit is better than not.
According to HTTP, I think sending no Content-Type more strongly
indicates that you don't know the type. In particular, missing content
type gives the recipient license to sniff the content.
Regards,
Maciej