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

Boris Zbarsky bzbarsky at MIT.EDU
Thu Nov 29 00:02:17 PST 2012

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 

> I was grouping them together because they both rely on context clues
> for modifying the sniffing (fallback) behavior

So first of all, "sniffing" and "default handling" are not the same 
thing at all.

But yes, context matters for determining default handling and also for 
determining sniffing.


More information about the whatwg mailing list