From 6f420efa81de57beadb6f0e858d36d32f2c98323 Mon Sep 17 00:00:00 2001 From: wmorgan Date: Wed, 7 Nov 2007 20:19:04 +0000 Subject: [PATCH] fix normalize_whitespace error where rubymail is breaking git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@677 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- lib/sup/message.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sup/message.rb b/lib/sup/message.rb index a899165..5decdee 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -361,11 +361,11 @@ private end def self.convert_from body, charset - return body unless charset - begin + raise MessageFormatError, "RubyMail decode returned a null body" unless body + return body unless charset Iconv.iconv($encoding, charset, body).join - rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence => e + rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}" File.open("sup-unable-to-decode.txt", "w") { |f| f.write body } body -- 2.45.2