RE: What does a document mean?

> From: www-tag-request@w3.org [mailto:www-tag-request@w3.org]On Behalf Of
> Elliotte Rusty Harold
> Sent: Friday, April 05, 2002 4:05 PM
> To: www-tag@w3.org
> Subject: Re: What does a document mean?
>
>
> At 8:45 PM -0800 3/31/02, Tim Bray wrote:
>
> >>I don't know that I believe that all documents on the Web have
> MIME types.
> >
> >Yes they do.  If only application/octet-stream.  If they don't
> >they're not on the web.
> >
>
> Can you cite the specs that prove that? Maybe it depends on what you
> mean by "on the web". I can believe this is true for http/https, but
> I'm not nearly as convinced for all other protocols out there. FTP
> predates MIME. Do you define "on the web" as "served by http"?

Actually, RFC2616, section 7.2.1 says:

	Any HTTP/1.1 message containing an entity-body SHOULD include a
Content-Type header field defining the
media type of that body. If and only if the media type is not given by a
Content-Type field, the recipient MAY
attempt to guess the media type via inspection of its content and/or the
name extension(s) of the URI used to identify
the resource. If the media type remains unknown, the recipient SHOULD treat
it as type "application/octetstream".

So it *is* allowed not to have the content-type header, and leaving it out
MAY enable the client to do a better guess (the client is allowed to guess
if and only if the header is absent, so leaving it out may be desirable!).

Received on Friday, 5 April 2002 10:25:07 UTC