W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2013

Re: [whatwg] [mimesniff] More issues on the MIME Sniffing spec

From: Gordon P. Hemsley <gphemsley@gmail.com>
Date: Thu, 6 Jun 2013 10:22:05 -0400
Message-ID: <CAH4e3M4f7+t=05dzyBS-WsQs5-MmKqjv0W0f6zuQQQB3zcg64A@mail.gmail.com>
To: Peter Occil <poccil14@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
On Thu, Jun 6, 2013 at 5:42 AM, Peter Occil <poccil14@gmail.com> wrote:
> I want to respond to the following issues in the MIME Sniffing spec:
>
> Resources
>
> I suggest the following wording for the issue box starting with "A resource
> is..."
>
>    A resource is a data item or message, such as a file or an HTTP response.
>
> I believe this covers the cases that would normally be associated with a
> MIME type.

I already have an idea about how to define "resource".

The reason it's not currently in the spec is because I recall Hixie
expressing some concern about complexity beyond "bag of bits" and I'm
waiting on feedback from him.

> Contexts
>
> I don't think the word "context" needs to be specially defined.  The start
> of section 8
> could be rewritten to remove the definition:
>
> [[
> In certain cases, it is only useful to identify resources that belong to a
> certain subset of MIME types. In these cases, it is appropriate to use a
> context-specific sniffing algorithm in place of the MIME type sniffing
> algorithm in order to determine the sniffed MIME type of a resource.
>
> This specification defines the following context-specific sniffing
> algorithms.
> ]]

On the contrary, I think it may be important to define "context", as
it is the only lens through which to see fetching and sniffing and the
like.

Currently, the HTML spec only defines "(nested) browsing context", so
I put together a wiki page that lists all the other ones that exist
implicitly:

http://wiki.whatwg.org/wiki/Contexts

I plan to rewrite the whole second half of the spec to be in terms of
contexts soon.

> Apache Bug
>
> As for the Apache bug flag, would it be useful to additionally check the
> HTTP
> headers for a Server header and check if it contains "Apache/"?  I don't
> know which
> version of Apache the bug involved was fixed in, so I can't suggest a more
> accurate
> string check.

That thought had crossed my mind, but the handling of the situation
mostly predates my editing of the spec, so I haven't given much
thought into whether the current method is the ideal one.

> MP3 Sniffing
>
> Finally, the Firefox team has recently included a patch to support sniffing
> MP3
> files better [1] and would like to document it and add it to the MIME
> Sniffing
> spec. [2]  The disadvantage, though, is that more than 512 bytes
> are required for an accurate detection.
>
> --Peter
>
> [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=862088
> [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=879429
>

I'm aware of this. I was told that a proposal would be made in due
course, so I'm waiting on that.

--
Gordon P. Hemsley
me@gphemsley.org
http://gphemsley.org/http://gphemsley.org/blog/
Received on Thursday, 6 June 2013 14:22:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:22 UTC