[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML files as attachments



On August 9, 2002 at 03:22, Mooffie wrote:

> I searched the source code for the relevant code and found it in 
> 'mhtxthtml.pl' (and 'mhtxtplain.pl'):
> 
>     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.

--ewh

---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]