You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2005/05/02 20:51:40 UTC
svn commit: r165661 - /spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm
Author: felicity
Date: Mon May 2 11:51:39 2005
New Revision: 165661
URL: http://svn.apache.org/viewcvs?rev=165661&view=rev
Log:
bug 4298: if at the end of parsing out the content-type header we don't actually have a type, assume text/plain.
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm?rev=165661&r1=165660&r2=165661&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm Mon May 2 11:51:39 2005
@@ -748,6 +748,9 @@
$ct =~ tr/\000-\040\177-\377\042\050\051\054\056\072-\077\100\133-\135//d;
$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).