After nosing around in rfc2231, and playing with a few problematic clients, I have found that the rfcs permit (by means of omission) both filename* and filename attributes to the Content-Disposition header. Doing so causes file attachments to retain their filenames in both good, rfc2231 compliant clients such as Netscape, and non-compliant clients such as Microsoft Outlook.
I have modified attachments.c to include both of these attributes to that header. Diffs for this are included in the attachment. This patch is sub-optimal, and shouldn't be considered anything but a temporary workaround. Specifically, for plain text attachments two filename attributes will appear in the Content-Disposition header (instead of filename and filename*). The patch also doesn't properly %hex encode filenames, instead replacing problematic characters with the _ character. This is consistent with the distributed code. If you install this patch at your site, it may break things all to heck. The version I am using is the 20021026 release from Double Precision. Your version may (will) differ. If the patch doesn't work, you may assume that it's because I'm an incompetent clod, not any fault of the actual courier development team. You have been warned. Clay Dowling -- Lazarus Notes from Lazarus Internet Development http://www.lazarusid.com/notes/ Articles, Reviews and Commentary on web development
attachments.c.diff
Description: Binary data
