- From: Roy T. Fielding <fielding@gbiv.com>
- Date: Fri, 31 Aug 2007 11:20:51 -0700
- To: Robert Burns <rob@robburns.com>
- Cc: "public-html@w3.org WG" <public-html@w3.org>
On Aug 31, 2007, at 10:59 AM, Robert Burns wrote: > On Aug 31, 2007, at 12:31 PM, Roy T. Fielding wrote: >> On Aug 31, 2007, at 8:01 AM, Robert Burns wrote: >>>> One of the main reasons for this is because the W3C hasn't made >>>> it clear to developers and browser manufacturers that it's the >>>> media-type ("application/xhtml+xml") that people need to get >>>> used to, not just the XML syntax of XHTML, and it's the media- >>>> type that makes the document XHTML. >>> >>> We've been discussing this at length on the "review of content >>> type rules by IETF/HTTP community" thread (see also the wiki >>> page [1]). I think a more accurate way to think of it is that a >>> file's type is determined by the internals of the file and the >>> authoring tool. >> >> No, that is the completely wrong way to think of it. Media types >> define how a given sequence of bytes are intended to be processed >> by the recipient. I can author dozens of types in vim. It is >> impossible to determine the media type of content by sniffing. >> It is sometimes possible to determine a range of possible media >> types and pick one based on configuration, but there are always >> exceptions that will cause such a pick to be wrong. > > I'm not sure what I said conflicts with what you're saying. My > point is that an author and the tool the author uses creates a file > of a certain type (even before it reaches an HTTP server). No > sniffing is necessary at this stage because the author and > authoring tool combination already know the type of file they're > creating. As you said "I can author dozens of types in vim". And > you are the one in charge of deciding what type you're authoring. > You may be saving it to disk with each edit and each time the HTML > file you're authoring is made available as a PNG file through an > http daemon. Does that misconfigured server say anything about the > file type you're authoring in vim? No and it shouldn't That is still wrong. Media Type != Data Format. Authoring tools know data formats (at least supersets, like text/*). Authoring tools never know HTTP's value for Content-Type. Never. You are thinking of Content-Type as a data format. That is not its purpose in MIME and HTTP. >> If you are going to make rules for sniffing, you need to be honest >> about the nature of that beast -- no matter what you define, it will >> be wrong some percentage of the time. It is the user's choice to >> determine when that is acceptable, not the choice of a standard. > > Sniffing is certainly a problem. However, browsers vendors are > finding sniffing to be more reliable than content-type headers. So > there's problems with sniffing and there's problems in the process > of affixing and retaining the author/authoring tool intended media > type to a file. No, sniffing is impossible, and the authoring tool doesn't know the intended media type. Media types are a protocol issue that is related to the data format, but every data format has at least three overlapping potential media types (and usually much more than three, since the extension space for media types is bounded only by string sizes). The only way that a media type can be assigned is when a human makes a choice, by various configuration mechanisms, to assign such a type. DefaultType is one such choice -- it only becomes a bug when authors are ignorant of the configuration choices, which in turn is a direct result of sniffing in silence. ....Roy
Received on Friday, 31 August 2007 18:21:08 UTC