On Wed, 1 Apr 2009, Adam Barth wrote:
>> Right. The information you're talking about is irrelevant to most
>> non-browser HTTP agents and so doesn't belong in the HTTP specification.
>
> It's relevant to any HTTP user agent that wishes to interoperate with
> existing Web content. For example, Imageshop (described earlier in this
> thread) is not a browser but is interested in knowing when its users expect
> an HTTP response to be treated as an image.
I think this is an example of mixed layerings that leads to no good.
HTTP is a transport layer and a HTTP transport does not need to perform any
guessing of contents at all. It provides data and meta-data. Fine.
Applications that get stuff over HTTP may want to guess the content and ignore
the Content-Type. Sure, but that's not HTTP.
I consider that a little like an unzip program checking that the .zip file
looks like an actual zip before it operates on it. If the zip program
downloads the file over HTTP it doesn't mean that we need to teach the HTTP
spec on how the zip client may want to guess if the content truly is a zip or
not.
--
/ daniel.haxx.se