Skip Menu |
 

This queue is for tickets about the MailTools CPAN distribution.

Report information
The Basics
Id: 1479
Status: resolved
Worked: 3 min
Priority: 0/
Queue: MailTools

People
Owner: Nobody in particular
Requestors: rspier [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.48
Fixed in: 1.15



MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
Subject: Extraneous whitespace at end of headers
Content-Type: multipart/mixed; boundary="----------=_1030513094-19697-0"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1060
The current Mail::Mailer adds whitespace to the end of header lines in _cleanup_hdrs. This is bad because it screws up other programs which don't expect there to be whitespace there. A good example of a program that breaks is INN. (Whether or not those other programs are broken too is unrelated to this ticket.) Mail::Mailer shouldn't add whitespace at the end of lines, and in general, its safer to trim whitespace at the end of header lines. The 1.15 release doesn't have this issue, although there was probably a reason for the change. Thus, I present the following patch: --- Mail/Mailer.pm.orig Tue Aug 27 22:22:07 2002 +++ Mail/Mailer.pm Tue Aug 27 22:22:44 2002 @@ -305,6 +305,7 @@ foreach $h (values %$hdrs) { foreach (ref($h) ? @{$h} : $h) { s/\n\s*/ /; + s/\s*$//o; } } } It does not revert the code to the 1.15 version, because there must have been a reason for the change, but adds code to trim trailing whitespace off of each element. Be conservative in what you accept and liberal in what you send. -R
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
MIME-Version: 1.0
X-Mailer: MIME-tools 5.405 (Entity 5.404)
Content-Type: multipart/mixed; boundary="----------=_1030516250-19701-5"
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 71
Valid remark. I have changed it into s/\n\s*//g; s/\s+$//; OK?
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.