ietf-822
[Top] [All Lists]

Re: content-type and name parameter

2005-12-09 10:51:19


I have a question about the use of name parameter in MIME header content-type.

Such parameter is optional in most of the media types,

It is deprecated, not optional. See RFC 2046 section 4.5.1. Software doesn't
have to generate this field to transfer filename information and must certainly
should not be using this value to control any aspect of processing.

The correct place to put file name information is in the filename parameter 
on the content-disposition line. But even this field is optional - you cannot
rely on it being there. In many cases including the filename is totally
inappropriate.

and
(correct me if I'm wrong) it's optional for application/msword,
application/pdf and similar media types.

It doesn't matter what the specific media type is: It is deprecated in all
cases.

Also if it is optional it seems that most of desktop e-mail clients
include it when generating one of such content-type.

Good ones will at most generqate this field in addition to putting the filename
in the content-disposition line. And even that is probably no longer a very
good idea.

So I wonder if there is any client (desktop client for Windows, Mac, etc..)
that doesn't include the name parameter when creating a content-type.

Well, the client I'm using right now does. I wouldn't use a client that
includes file names by default, in any field whatsoever.

Could someone rely on the presence of such parameter to develop some software 
?
I think no, but your opinion is very much important for me.

Absolutely not. You cannot rely on ANY sort of filename information being
present in the header. MIME uses media type information to control processing,
not file name information. Clients that depend on file name information
for this are egregiously broken. Sadly, there are many such clients, and 
they contribute substantially to ongoing security problems for email.

In the cases where the file name is useful it should be carried in the
content-disposition field as a filename parameter. Placing the information in a
name parameter on the content-type is at best a sop to broken clients.

                                Ned

<Prev in Thread] Current Thread [Next in Thread>