Re: HTML files as attachments

2002-08-08 23:00:46
On August 9, 2002 at 03:22, Mooffie wrote:

I searched the source code for the relevant code and found it in 
'' (and ''):

    if ($args =~ /\battachcheck\b/i) {
        my($disp, $nameparm) = readmail::MAILhead_get_disposition($fields);
        if ($disp =~ /\battachment\b/i) {

When I change it to:

        if ($disp =~ /\b(attachment|inline)\b/i) {

apparently everything works like I want it to.

Do you see any problems in my "solution"?

Yes, because what you are basically checking for is the *existence*
of the Content-Disposition header.  Logically, if a Content-Disposition
is not present, "inline" is assumed.

You are taking advantage of a common MUA behavior where the main
message header usually does explicitly define a Content-Disposition.

But hey, if it the above works for use, who am I to argue about it.
Note, to just check for the existance of Content-Disposition, the
following will do:

    if (defined($fields->{'content-disposition'})) {

Another question:

Are there MUAs that attach files without including the 
"Content-Disposition" header at all?

Yes, I know of one.  However, it is an MUA that I seriously doubt
any of your users will use.  I believe all the popular GUI
MUAs will define it.


To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the

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