Re: NEW ISSUE: content sniffing

Adam Barth wrote:
> On Tue, Mar 31, 2009 at 7:44 PM, Roy T. Fielding <fielding@gbiv.com> wrote:
>> It is impossible to determine a media-type (how a recipient should
>> process a given representation) by sniffing the content (the data format).
> 
> Regardless, many popular user agents override the server-provided MIME
> type after examining the content of HTTP responses.

But only for a certain set of MIME types, which are known to be 
frequently incorrect, right?

>> When a media type
>> is not present (or is detectably incorrect), only the implementation
>> doing the processing can determine an appropriate guess because that
>> guess is almost always determined by the context in which the
>> reference was made (not by the content).
> 
> Content sniffing algorithms in browsers largely ignore the context in
> which the HTTP response is being used.  Specifically, algorithm for
> computing the effective MIME type is a function of the HTTP response
> alone (both in practice and in draft-abarth-mime-sniff).

My understanding was that the context *is* relevant (stylesheet? image?).

> ...
> I don't think that content sniffing will magically disappear if we
> just ignore it long enough.  Instead, we should shed some light on
> this dark corner of reality.
> ...

As long as it is clear that it's still an option not to sniff at all, 
and as long as the goal remains to minimize the amount of sniffing going 
on...

That said, why is it important that the HTTP spec references this document?

BR, Julian

Received on Wednesday, 1 April 2009 08:47:27 UTC