Re: [whatwg] How to determine content-type of file: protocol

2014-07-28 Thread Gordon P. Hemsley
On 07/28/2014 08:01 AM, duanyao wrote: On 07/28/2014 06:34, Gordon P. Hemsley wrote: Sorry for the delay in responding. Your message fell through the cracks in my e-mail filters. On 07/17/2014 08:26 AM, duanyao wrote: Hi, My first question is about a rule in MIME Sniffing specification (http

Re: [whatwg] How to determine content-type of file: protocol

2014-07-27 Thread Gordon P. Hemsley
7;ll be happy to update mimesniff to fill it, if that's determined to be the best course of action. HTH, Gordon [1] http://wiki.whatwg.org/wiki/Contexts [2] http://mimesniff.spec.whatwg.org/#context-specific-sniffing -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/

Re: [whatwg] [mimesniff] The Apache workaround should not sniff random types

2014-01-16 Thread Gordon P. Hemsley
uire the behavior it currently requires. -Boris I have finally made this change. Please confirm that this is what you had in mind: https://github.com/whatwg/mimesniff/commit/d7bafc16ee480a5dea4c27d60dd5272388e022ce http://mimesniff.spec.whatwg.org/#rules-for-text-or-binary -- Gordon P. Hemsle

Re: [whatwg] [mimesniff] The Apache workaround should not sniff random types

2013-11-16 Thread Gordon P. Hemsley
uire the behavior it currently requires. -Boris I'm inclined to agree. Having heard no objection (or, indeed, any discussion whatsoever) in the last 3 months, I plan to move ahead with this proposed change. Anyone else have anything to say before I do? -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/

Re: [whatwg] Zip archives as first-class citizens

2013-08-28 Thread Gordon P. Hemsley
prefix combo would come before the plain hash which holds the ID. So, for example: http://whatwg.gphemsley.org/url_test.php?file=test.zip&spacer=1#/example.html#middle Then you could also take the opportunity to spec the #! prefix (and other hash-combo prefixes) that is used by a lot of sites nowadays. -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/

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

2013-06-06 Thread Gordon P. Hemsley
gt; 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 m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Review request: Parsing a MIME type

2013-06-01 Thread Gordon P. Hemsley
pparently [1]). The parameters, especially the "codecs" > parameter, > can make a difference in what value is returned by the API. > > [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=875385 > -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Review request: Parsing a MIME type

2013-06-01 Thread Gordon P. Hemsley
On Sat, Jun 1, 2013 at 11:41 AM, Gordon P. Hemsley wrote: > On Fri, May 31, 2013 at 11:50 PM, Peter Occil wrote: >> * The word "base64" can only appear at the end of the MIME type, so that a >> data URL like >> "data:application/example;base64;foo=bar,AA

Re: [whatwg] [mimesniff] Review request: Parsing a MIME type

2013-06-01 Thread Gordon P. Hemsley
s in other than last place are warnings. (Not sure what the reasoning behind that distinction is, but that's what reality is.) So it seems the only issue I have to worry about is what to do with MIME types which only have parameters. Regards, Gordon -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

[whatwg] [mimesniff] Review request: Parsing a MIME type

2013-05-31 Thread Gordon P. Hemsley
does not get overridden by the later appearance of a boolean parameter of the same name. I think those are the important points of background information you need to know in order to evaluate this algorithm. I look forward to your response. Regards, Gordon -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Complete MIME type parsing algorithm for section 5

2013-05-28 Thread Gordon P. Hemsley
the following would not be well-formed under HTTP or MIME: > > text/plain;charset=ut?f-8 > text/plain;charset=utf=8 > > 4. Quoted parameter values are not checked to ensure that they do not > contain a 0x7F byte > or a byte other than TAB (0x09) that is less than 0x20. >

Re: [whatwg] [mimesniff] Complete MIME type parsing algorithm for section 5

2013-05-25 Thread Gordon P. Hemsley
te what you've proposed here, but in the meantime: Keep in mind that the Content-Type header is not the only source for a MIME type. This algorithm needs to consider MIME types from all possible sources. -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Complete MIME type parsing algorithm for section 5

2013-05-25 Thread Gordon P. Hemsley
the parameters > dictionary. > 13. Otherwise, run these substeps: > 1. Let value be the byte string from the current byte up to but > not including the next 0x20 (SPACE), 0x09 (TAB), or ";" byte. Advance > pointer to the next 0x20 (SPACE), 0x09 (TAB), or ";" byte. > 2. If value is empty or contains a byte that isn't a parameter > value byte, return undefined. > 3. Add the mapping of parameter to value to the parameters > dictionary. > > --- > > -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] An alternative approach to section 9 of Mime Sniffing

2013-05-25 Thread Gordon P. Hemsley
7;s much better to define the actual processing so implementers are > less inclined to take shortcuts when implementing (test suites also > help, but they're typically written way-after-the-fact). > > >> You should also explain whether another change to make section 9 more >> readable is >> appropriate (though it currently is relatively readable as is). > > > I'll leave that to Gordon. > > > -- > http://annevankesteren.nl/ -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] An alternative approach to section 9 of Mime Sniffing

2013-05-23 Thread Gordon P. Hemsley
ure. > jpeg = %xFF.D8.FF >; The JPEG Start of Image marker followed by the indicator >; byte of another marker. > > If the start of the byte sequence doesn't match any ABNF given above, return > undefined. > > --- > > I would appreciate comments. > > --Peter -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] Priority between and content-disposition

2013-05-08 Thread Gordon P. Hemsley
On Wed, May 8, 2013 at 12:21 PM, Boris Zbarsky wrote: > On 5/8/13 12:15 PM, Gordon P. Hemsley wrote: >> >> Perhaps. But maybe I'm not clear on what exactly the alternate >> proposal is. Are you suggesting not supporting the @download >> attribute? Or just igno

Re: [whatwg] Priority between and content-disposition

2013-05-08 Thread Gordon P. Hemsley
On Wed, May 8, 2013 at 12:01 PM, Boris Zbarsky wrote: > On 5/8/13 10:45 AM, Gordon P. Hemsley wrote: >> >> I still think @download takes priority. >> >> The Content-Disposition header says, "Nevermind what filename the URL >> shows; this is really file B.tx

Re: [whatwg] Priority between and content-disposition

2013-05-08 Thread Gordon P. Hemsley
On Wed, May 8, 2013 at 9:43 AM, Boris Zbarsky wrote: > On 5/8/13 6:53 AM, Gordon P. Hemsley wrote: >> >> It's not clear to me which of the two factors you take issue with. > > > The question of which filename takes priority. > > >> The second sentence ve

Re: [whatwg] Priority between and content-disposition

2013-05-08 Thread Gordon P. Hemsley
On Tue, May 7, 2013 at 10:18 PM, Boris Zbarsky wrote: > On 5/7/13 5:54 PM, Gordon P. Hemsley wrote: >> >> A @download attribute with a value would override both factors, like so: >> (1) Download it. >> (2) "A.txt" > > Why? > > You say this as if i

Re: [whatwg] Priority between and content-disposition

2013-05-07 Thread Gordon P. Hemsley
g a different filename is going to meaningfully > protect downloaded content. So I think a stronger UI warning is needed > in this scenario. > > Firefox currently doesn't support cross-origin @download references, > so I don't have any meaningful implementation experience to share > regarding that scenario. > > / Jonas -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] HTML differences from HTML4 document updated

2013-05-07 Thread Gordon P. Hemsley
s relevant to naming >> it, and to the content too, of course. Now it is neither a reliable >> comparison with links the relevant clauses nor an overview - it has too many >> details, to begin with. > > > It's more intended to be an overview. Can you give an example of something > that is too detailed and suggest the level of detail that would be more > appropriate? > > >> Is this for authors who consider moving from HTML 4.01 to HTML 5? > > > Yes. > > >> Then I think it should primarily specify what HTML 4.01 features are >> forbidden in HTML 5, then the extensions. > > > Thanks, that's useful feedback. > > > -- > Simon Pieters > Opera Software -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] HTML differences from HTML4 document updated

2013-05-03 Thread Gordon P. Hemsley
The document scope [1] explains why it uses "HTML" in the title as > opposed to HTML5 or HTML(5). > > --Xaxio > > References: > [1] http://html-differences.whatwg.org/#scope > > > > On Fri, May 3, 2013 at 11:16 AM, Gordon P. Hemsley > wrote: >> >

Re: [whatwg] HTML differences from HTML4 document updated

2013-05-03 Thread Gordon P. Hemsley
sheet: >>> >>> http://html-differences.**whatwg.org/<http://html-differences.whatwg.org/> >>> >> >> I think you should start from making the title sensible. "HTML differences >> from HTML4" is too esoteric even in this cont

Re: [whatwg] use of article to markup comments

2013-01-28 Thread Gordon P. Hemsley
your >> use case? >> ... >> >> >> >> >> In short, why should the spec suggest any specific method of marking up >> comments? > > Good question, in the case of recommended tomarkup comments > it seems like it's an element in search of a use case. > > For users who consume article semantics it appear to cause issues when > used for any piece of content ranging from a one sentence comment to > an article containing thousands of words or an interactive widget. > > > regards > SteveF -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Sniffing archives

2012-12-05 Thread Gordon P. Hemsley
if the user agent has the capability to interpret a resource of that media type and present it to the user." http://mimesniff.spec.whatwg.org/#supported-by-the-user-agent -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Sniffing archives

2012-12-04 Thread Gordon P. Hemsley
more specific: (1) Safari doesn't appear to prompt the user for any downloads. It just automatically downloads any file it can't handle. (2) If you allow Safari to open "safe" files that it downloads, ZIP appears to be one of them. Gzip and RAR, however, do not. So this isn't the

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

2012-11-29 Thread Gordon P. Hemsley
On Thu, Nov 29, 2012 at 2:30 PM, Adam Barth wrote: > On Wed, Nov 28, 2012 at 10:30 PM, Gordon P. Hemsley > wrote: >> Based on my reading of the source code, it seems that Gecko treats a >> resource served as 'application/octet-stream' as an unknown type which >>

Re: [whatwg] [mimesniff] Sniffing archives

2012-11-29 Thread Gordon P. Hemsley
To be clear, I'm asking this because I would like to remove the sniffing of archive types from the mimesniff spec if there aren't any valid usecases. On Wed, Nov 28, 2012 at 12:18 PM, Gordon P. Hemsley wrote: > The mimesniff spec currently includes signatures for ZIP, gzip, and

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

2012-11-29 Thread Gordon P. Hemsley
-stream" should be treated as if the media type was undefined? Or is this conversation moot now? -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

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

2012-11-29 Thread Gordon P. Hemsley
On Thu, Nov 29, 2012 at 3:02 AM, Boris Zbarsky 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 >> r

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

2012-11-29 Thread Gordon P. Hemsley
On Thu, Nov 29, 2012 at 2:32 AM, Boris Zbarsky wrote: > On 11/29/12 2:07 AM, Gordon P. Hemsley wrote: >> >> So perhaps a more useful question would be what to do in situations >> like that—should mimesniff treat "application/octet-stream" as a type >> "

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

2012-11-28 Thread Gordon P. Hemsley
On Thu, Nov 29, 2012 at 1:30 AM, Gordon P. Hemsley wrote: > Based on my reading of the source code, it seems that Gecko treats a > resource served as 'application/octet-stream' as an unknown type which > is sniffed as if no Content-Type was specified. Oh, wait, I forgot what

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

2012-11-28 Thread Gordon P. Hemsley
sniff-scriptable flag set, should it get its own call, with the sniff-scriptable flag unset? Are there other options here? I haven't checked what UAs actually do in practice, but I don't believe the spec currently allows anything but leaving resources tagged as 'application/octet-stream

Re: [whatwg] [mimesniff] Audio and video sniffing

2012-11-27 Thread Gordon P. Hemsley
n, 26 Nov 2012 23:38:02 +0100, Gordon P. Hemsley > wrote: > >> Upon looking through the code for Gecko's media sniffing, I noticed >> that they seem to combine sniffing for audio and video elements. Given >> that Opera has said that it uses the specific sniffing alg

Re: [whatwg] [mimesniff] Handling container formats like Ogg

2012-11-27 Thread Gordon P. Hemsley
On Tue, Nov 27, 2012 at 4:39 AM, Henri Sivonen wrote: > On Tue, Nov 27, 2012 at 12:59 AM, Gordon P. Hemsley > wrote: >> Would this be something UAs would prefer to handle in their Ogg >> library, or should I spec it as part of sniffing? > > What would be the use case fo

[whatwg] [mimesniff] Handling container formats like Ogg

2012-11-26 Thread Gordon P. Hemsley
ing (perhaps not unsimilar to what is done for MP4 video and what might have to be done with MP3 files without ID3 tags). Would this be something UAs would prefer to handle in their Ogg library, or should I spec it as part of sniffing? -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

[whatwg] [mimesniff] Audio and video sniffing

2012-11-26 Thread Gordon P. Hemsley
er if it would make sense to combine audio and video sniffing under a single audiovisual category? This would affect the "matching audio/video type pattern" sections and the "sniffing audio/video specifically" sections. Any objections? Other thoughts? -- Gordon P. Hemsle

[whatwg] [mimesniff] The X-Content-Type-Options header

2012-11-16 Thread Gordon P. Hemsley
cause of best current practice). Does anyone have any questions, comments, or objections about this issue? -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] Proposal for a debugging information API

2012-11-14 Thread Gordon P. Hemsley
ment, and would value opinions > on the value of a feature of this kind, and the merits of this particular > approach. > > > https://docs.google.com/document/pub?id=1pw2Bzvy6OEn8YY3fAcZiReJPmgB79swkx-NJAdcemPk > > Thanks! > > -Dave > -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

Re: [whatwg] [mimesniff] Review requested on MIME Sniffing Standard

2012-11-12 Thread Gordon P. Hemsley
On Mon, Nov 12, 2012 at 6:08 PM, Ian Hickson wrote: > On Mon, 12 Nov 2012, Gordon P. Hemsley wrote: >> But if everyone vows to just wait for 512 bytes (or EOF), then that's >> fine with me. > > I don't think we should require tools to wait for 512 bytes. This is

Re: [whatwg] [mimesniff] Review requested on MIME Sniffing Standard

2012-11-12 Thread Gordon P. Hemsley
hat's intended, but I don't know. The selection of which bytes to sniff predates me, and I don't know what the use cases are. > Otherwise, looks good to me. Thanks for the review! -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/

[whatwg] [mimesniff] Review requested on MIME Sniffing Standard

2012-11-05 Thread Gordon P. Hemsley
blocking the general bug here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=19746 And if you want to follow the commits as they happen, you can follow @mimesniff on Twitter: https://twitter.com/mimesniff Thanks! Gordon -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.or

[whatwg] [wiki] The WHATWG Wiki has been upgraded

2012-10-28 Thread Gordon P. Hemsley
n contact one of the permanent autoconfirmed users listed here: http://wiki.whatwg.org/index.php?title=Special:ListUsers&group=autoconfirmed Happy wikiing! Gordon P.S. If you think you should be a permanent autoconfirmed member (and you're not), ping me on IRC or drop me a lin

Re: [whatwg] base64 entities

2010-08-27 Thread Gordon P. Hemsley
ything "too bad" about using PHP 5.2 or higher with new technology.[1] Regards, Gordon [1] See also: http://gophp5.org/ -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/ http://sasha.sourceforge.net/ • http://www.yoursasha.com/

Re: [whatwg] Proposal: @srctype or @type on

2010-07-13 Thread Gordon P. Hemsley
On Tue, Jul 13, 2010 at 3:26 AM, Boris Zbarsky wrote: > On 7/12/10 11:31 PM, Gordon P. Hemsley wrote: >> >> The particular use case that prompted me to think about this is >> including a PDF via . In Firefox (last I checked), one is >> required to install a separate ad

Re: [whatwg] Proposal: @srctype or @type on

2010-07-12 Thread Gordon P. Hemsley
Nils, I don't hate the HTTP Content-Type header. In fact, I like it very much. But this proposal was intended to guide the user agent before they ever receive the HTTP Content-Type header. ;) Cheers, Gordon On Tue, Jul 13, 2010 at 2:48 AM, Nils Dagsson Moskopp wrote: > "Gord

[whatwg] Proposal: @srctype or @type on

2010-07-12 Thread Gordon P. Hemsley
urs. (TIFF files, perhaps? Like on the U.S. Patent Office's website?) Now, I'm not a spec implementor by any means, but I am a web author and a web user, so I've been on both sides of this issue. And it doesn't appear that it would be too complicated to extend the existing suppo

Re: [whatwg] select element should have a required attribute

2010-06-18 Thread Gordon P. Hemsley
If so, then it always > does. The default value for a select element is not an empty string as an > is always there (unless someone has been stupid enough to create an > empty select list.) > > As such, some sort of value will always be sent. > > Thanks, > Ash >

Re: [whatwg] Is there a way to stop scrolling when pressing directional arrows?

2010-06-14 Thread Gordon P. Hemsley
Flash. To be honest, I'm > often annoyed at the way Flash steals the focus of all my key presses making > it almost impossible to navigate using only the keyboard. > > You could use Javascript to put the focus onto an object, capture all the > key presses on that and return fals

Re: [whatwg] <% text %> and in corporate intranet html content

2010-02-15 Thread Gordon P. Hemsley
On Tue, Feb 9, 2010 at 10:05 PM, Biju wrote: > What should a user agent display when html content is... > > > <%@ page language="java" %> > > > At present IE and Safari display blank > > Firefox display <%@ page language="java" %> > > And for document.body.innerHTML browsers give > Firefox -->

Re: [whatwg] the cite element

2009-10-06 Thread Gordon P. Hemsley
On Tue, Oct 6, 2009 at 4:15 PM, Erik Vorhes wrote: > On Tue, Oct 6, 2009 at 2:52 PM, Gordon P. Hemsley wrote: >> I also propose allowing parenthetical citations and footnote markers >> (as is used in the various W3C/WHATWG specifications) to also be >> marked up with , t

Re: [whatwg] the cite element

2009-10-06 Thread Gordon P. Hemsley
l zone that will lead to an amicable resolution of this long debate. Regards, Gordon -- Gordon P. Hemsley m...@gphemsley.org http://gphemsley.org/ • http://gphemsley.org/blog/ http://sasha.sourceforge.net/ • http://www.yoursasha.com/

Re: [whatwg] [html5] r4029 - [e] (0) Example of use without .

2009-09-29 Thread Gordon P. Hemsley
Ah. I was afraid you might say that. On Tue, Sep 29, 2009 at 6:54 PM, Ian Hickson wrote: > On Tue, 29 Sep 2009, Gordon P. Hemsley wrote: > > > > s/Html/html/ > > Actually that was intentional in that example. I like to show a variety of > syntaxes so that people

Re: [whatwg] [html5] r4029 - [e] (0) Example of use without .

2009-09-29 Thread Gordon P. Hemsley
13031,7 +13031,60 @@ >> >> + >> + Here is a graduation programme with two sections, one for the >> + list of people graduating, and one for the description of the >> + ceremony. >> + >> + <!DOCTPE Html> >> > > s/DOCT

Re: [whatwg] article/section/details naming/definition problems

2009-09-16 Thread Gordon P. Hemsley
I'd sent this earlier, but it got caught in the message queue that apparently nobody checks. Let's see if it works this time. -- Forwarded message ------ From: Gordon P. Hemsley Date: Tue, Sep 15, 2009 at 11:31 PM Subject: Re: [whatwg] article/section/details naming/