RE: Unknown content types

> From: www-tag-request@w3.org [mailto:www-tag-request@w3.org]On Behalf Of
> Paul Prescod
> Sent: Tuesday, July 08, 2003 8:34 PM
> To: WWW-Tag
> Subject: Unknown content types
>
>
>
> Someone sends me an email attachment (strictly speaking out of the realm
> of the Web but I think it is close enough for our discussion).
>
> It has the following header:
>
> Content-Type: application/octet-stream; name=foo.pdf
>
> My Mac tries to dispatch this to the same application I used for the
> last application/octet-stream. That's not very useful.
>
> Obviously the sending machine did not know the content type of the data
> (they usually don't because Windows tends not to remember content
> types). Was it right to send "application/octet-stream" or should it
> have left the header out altogether? Should my Mac have interpreted
> "application/octet-stream" as "I don't know what this is...you can guess
> if you want."
>
> Somewhere we lost the information that nobody knows the content type and
> that guessing or asking the user is better than treating it as if it was
> well-known. I'm trying to determine who made the mistake.

Correct.

I think that both positions below make sense, but that we should agree on
exactly one of them:

1) If a sender (mail agent, HTTP server, ....) doesn't know the MIME type,
specify "application/octet-stream" (note that RFC2616, section 7.2.1 [1]
says "...SHOULD include a Content-Type header..."). In turn, allow
recipients to override the supplied MIME type if and only if it equals
"application/octet-stream" and to guess (for instance by peeking into the
content).

or

2) If a sender (mail agent) / server (HTTP server) doesn't know the MIME
type, DO NOT SEND IT. This allows the recipient to guess and/or consult the
user.

(my personal preference would be alternative 2 because it doesn't require to
special-case one particular MIME type).

Regards, Julian


[1] <http://www.greenbytes.de/tech/webdav/rfc2616.html#type>

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

Received on Wednesday, 9 July 2003 16:10:00 UTC