W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2009

Re: NEW ISSUE: content sniffing

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 01 Apr 2009 10:46:42 +0200
Message-ID: <49D329F2.90902@gmx.de>
To: Adam Barth <w3c@adambarth.com>
CC: "Roy T. Fielding" <fielding@gbiv.com>, HTTP Working Group <ietf-http-wg@w3.org>
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 

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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:10:49 UTC