From 87505dd7714b6311c58589752f1f5331ac1d9b1a Mon Sep 17 00:00:00 2001 From: shugo Date: Tue, 3 Jun 2014 04:19:57 +0000 Subject: * lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body type as "MIXED" followed immediately by params [ruby-core:62864] [Bug #9885] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/imap.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/net') diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 2e0f558054..9f8ad7b273 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -2374,6 +2374,8 @@ module Net return body_type_msg when /\A(?:ATTACHMENT)\z/ni return body_type_attachment + when /\A(?:MIXED)\z/ni + return body_type_mixed else return body_type_basic end @@ -2456,6 +2458,13 @@ module Net return BodyTypeAttachment.new(mtype, nil, param) end + def body_type_mixed + mtype = "MULTIPART" + msubtype = case_insensitive_string + param, disposition, language, extension = body_ext_mpart + return BodyTypeBasic.new(mtype, msubtype, param, nil, nil, nil, nil, nil, disposition, language, extension) + end + def body_type_mpart parts = [] while true -- cgit v1.2.3