Project

General

Profile

Bug #6397

Net::IMAP::ResponseParseError: unexpected token LPAR (expected QUOTED or LITERAL)

Added by romanbsd (Roman Shterenzon) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
Backport:
[ruby-core:44849]

Description

While parsing the following response:

C: RUBY0004 UID FETCH 2862 BODYSTRUCTURE
S: * 980 FETCH (UID 2862 BODYSTRUCTURE ((("TEXT" "PLAIN" ("CHARSET" "iso-8859-1") NIL NIL "7BIT" 416 21 NIL NIL NIL)("TEXT" "HTML" ("CHARSET" "iso-8859-1") NIL NIL "7BIT" 1493 32 NIL NIL NIL) "ALTERNATIVE" ("BOUNDARY" "Boundary_(ID_IaecgfnXwG5bn3x8lIeGIQ)") NIL NIL)("MESSAGE" "RFC822" ("NAME" "Fw_ ____ _____ _.eml") NIL NIL "7BIT" 1980088 NIL ("ATTACHMENT" ("FILENAME" "Fw __ _____ _.eml")) NIL) "MIXED" ("BOUNDARY" "Boundary(ID_eDdLc/j0mBIzIlR191pHjA)") NIL NIL))
@str: "* 980 FETCH (UID 2862 BODYSTRUCTURE (((\"TEXT\" \"PLAIN\" (\"CHARSET\" \"iso-8859-1\") NIL NIL \"7BIT\" 416 21 NIL NIL NIL)(\"TEXT\" \"HTML\" (\"CHARSET\" \"iso-8859-1\") NIL NIL \"7BIT\" 1493 32 NIL NIL NIL) \"ALTERNATIVE\" (\"BOUNDARY\" \"Boundary_(ID_IaecgfnXwG5bn3x8lIeGIQ)\") NIL NIL)(\"MESSAGE\" \"RFC822\" (\"NAME\" \"Fw_ __
_____ _.eml\") NIL NIL \"7BIT\" 1980088 NIL (\"ATTACHMENT\" (\"FILENAME\" \"Fw __ _____ ___.eml\")) NIL) \"MIXED\" (\"BOUNDARY\" \"Boundary(ID_eDdLc/j0mBIzIlR191pHjA)\") NIL NIL))\r\n"
@pos: 360
@lex_state: EXPR_DATA
@token.symbol: LPAR
@token.value: "("
Net::IMAP: unexpected token LPAR (expected QUOTED or LITERAL) /app/lib/net/imap.rb:3278:in parse_error'
/app/lib/net/imap.rb:3130:in
match'
/app/lib/net/imap.rb:3078:in case_insensitive_string'
/app/lib/net/imap.rb:2399:in
media_type'
/app/lib/net/imap.rb:2332:in body_type_basic'
/app/lib/net/imap.rb:2327:in
body_type_1part'
/app/lib/net/imap.rb:2311:in body'
/app/lib/net/imap.rb:2367:in
body_type_msg'
/app/lib/net/imap.rb:2325:in body_type_1part'
/app/lib/net/imap.rb:2311:in
body'
/app/lib/net/imap.rb:2386:in body_type_mpart'
/app/lib/net/imap.rb:2309:in
body'
/app/lib/net/imap.rb:2286:in body_data'
/app/lib/net/imap/response_parser.rb:30:in
msg_att'
/app/lib/net/imap.rb:2168:in numeric_response'
/app/lib/net/imap.rb:2110:in
response_untagged'
/app/lib/net/imap.rb:2090:in response'
/app/lib/net/imap.rb:2016:in
parse'
/app/lib/net/imap.rb:1167:in get_response'
/app/lib/net/imap.rb:1075:in
receive_responses'
/app/lib/net/imap.rb:1061:in block in initialize'
Net::IMAP::ResponseParseError: unexpected token LPAR (expected QUOTED or LITERAL)
from /app/lib/net/imap.rb:3278:in
parse_error'

Associated revisions

Revision 9be3aa17
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Revision 35558
Added by shugo (Shugo Maeda) about 7 years ago

  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

History

Updated by mame (Yusuke Endoh) about 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to shugo (Shugo Maeda)
#2

Updated by shugo (Shugo Maeda) about 7 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35558.
Roman, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/net/imap.rb (body_type_attachment): parse body type "ATTACHMENT". [ruby-core:44849] [Bug #6397]

Also available in: Atom PDF