W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] [mimesniff] Treating application/octet-stream as unknown for sniffing

From: Gordon P. Hemsley <gphemsley@gmail.com>
Date: Thu, 29 Nov 2012 12:45:35 -0500
Message-ID: <CAH4e3M6skbqWtmc0A3SW4bmDVzTKGN=stDSJU5hscWpXsupbng@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: whatwg@lists.whatwg.org
On Thu, Nov 29, 2012 at 3:02 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 11/29/12 2:53 AM, Gordon P. Hemsley wrote:
>> At one point it says, "The MIME type "application/octet-stream" with
>> no parameters is never a type that the user agent knows it cannot
>> render. User agents must treat that type as equivalent to the lack of
>> any explicit Content-Type metadata when it is used to label a
>> potential media resource."
>> But later it says, "The canPlayType(type) method must return the empty
>> string if type is a type that the user agent knows it cannot render or
>> is the type "application/octet-stream";"
> What's the contradiction?  We have set S = { types the user agent knows it
> cannot render }.  We have set T = S union { application/octet-stream }
> What the above statements tell us so far is:
> 1)  T != S
> 2)  canPlayType(type) must return empty string for all types in T.
> But later on in the resource selection algorithm there are certain actions
> taken for elements of S only.
>> This seems to me to be unclear as to when sniffing of the audio/video
>> resource occurs, and what it is used for.
> It's used for actually showing the video even if it's sent as
> application/octet-stream.

The apparent contradiction occurs when, e.g., an Opus file is tagged
as "application/octet-stream".

If I understand correctly, a UA would return "" when canPlayType() is
called against such a file—but then the file would actually play
because it is later sniffed as "application/ogg".

Am I missing something?

Gordon P. Hemsley
Received on Thursday, 29 November 2012 18:12:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:48 UTC