Mailing List Archive

svn commit: r171012 - /spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm
Author: felicity
Date: Thu May 19 16:32:42 2005
New Revision: 171012

URL: http://svn.apache.org/viewcvs?rev=171012&view=rev
Log:
bug 4298: certain invalid content-type headers would end out with no content-type. assume text/plain for anything we don't otherwise parse out.

Modified:
spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm

Modified: spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm?rev=171012&r1=171011&r2=171012&view=diff
==============================================================================
--- spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm (original)
+++ spamassassin/branches/3.0/lib/Mail/SpamAssassin/Util.pm Thu May 19 16:32:42 2005
@@ -663,6 +663,9 @@
$ct =~ tr/\000-\040\177-\377\042\050\051\054\056\072-\077\100\133-\135//d; # strip inappropriate chars
$ct = lc $ct;

+ # bug 4298: If at this point we don't have a content-type, assume text/plain
+ $ct ||= "text/plain";
+
# Now that the header has been parsed, return the requested information.
# In scalar context, just the MIME type, in array context the
# four important data parts (type, boundary, charset, and filename).