8000 IMAP: Multiple bugs by tonyarkles · Pull Request #196 · ruby/ruby · GitHub
[go: up one dir, main page]

Skip to content

IMAP: Multiple bugs #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding support for (BODY ("MIXED"))
This seems like a strange message body, but Gmail returns it to me for a few messages.
  • Loading branch information
tonyarkles committed Oct 13, 2012
commit b8ac89c6f30e0692c13e528e200d381abfda5311
4 changes: 4 additions & 0 deletions lib/net/imap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2476,6 +2476,10 @@ def body_type_mpart

def media_type
mtype = case_insensitive_string
token = lookahead
if token.symbol != T_SPACE
return mtype, nil
end
match(T_SPACE)
msubtype = case_insensitive_string
return mtype, msubtype
Expand Down
6 changes: 6 additions & 0 deletions test/net/imap/test_imap_response_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ def test_msg_delivery_status
def test_msg_with_message_rfc822_attachment
assert_parseable <<EOF
* 5441 FETCH (BODY ((("TEXT" "PLAIN" ("CHARSET" "iso-8859-1") NIL NIL "QUOTED-PRINTABLE" 69 1)("TEXT" "HTML" ("CHARSET" "iso-8859-1") NIL NIL "QUOTED-PRINTABLE" 455 12) "ALTERNATIVE")("MESSAGE" "RFC822" ("NAME" "ATT00026.eml") NIL NIL "7BIT" 4079755) "MIXED"))
EOF
end

def test_msg_body_mixed
assert_parseable <<EOF
* 1038 FETCH (BODY ("MIXED"))
EOF
end
end
0