diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-08 10:18:26 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-08 10:18:26 +0000 |
commit | 29d6d15fc3dcb0d1c0ba531c5de7a8ea025f4ceb (patch) | |
tree | 4f2df38ae8d2bb9a9c64c850acede48b4b97f6e8 /actionmailer/test | |
parent | b0a35b6fe9c1a6a0eb14f2079a1bc8ff692ab621 (diff) | |
download | rails-29d6d15fc3dcb0d1c0ba531c5de7a8ea025f4ceb.tar.gz rails-29d6d15fc3dcb0d1c0ba531c5de7a8ea025f4ceb.tar.bz2 rails-29d6d15fc3dcb0d1c0ba531c5de7a8ea025f4ceb.zip |
Silently ignore Errno::EINVAL errors when converting between charsets. Some mail clients apprently send X-UNKNOWN to represent unknown charsets, and this caused the conversion to blow up.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1395 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 9ed2cd2293..d9f6935674 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -515,5 +515,11 @@ EOF fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email9") assert_raise(TMail::SyntaxError) { TMail::Mail.parse(fixture) } end + + def test_decode_message_with_unknown_charset + fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email10") + mail = TMail::Mail.parse(fixture) + assert_nothing_raised { mail.body } + end end |