Issue #11128 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED

ruby_2_1 r50583 merged revision(s) 50444.

----------------------------------------
Bug #11128: IMAP parsing issue wih body_ext_mpart
https://bugs.ruby-lang.org/issues/11128#change-52543

* Author: Mor Sela
* Status: Closed
* Priority: Normal
* Assignee: Shugo Maeda
* ruby -v: 2.2.2
* Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: REQUIRED
----------------------------------------
ResponseParser raises an error given a valid (RFC 3501) "body_ext_mpart" of the format "body-fld-param SP body-fld-dsp".

sample response:
"* 4 FETCH (BODY (((\"text\" \"plain\" (\"charset\" \"utf-8\") NIL NIL \"7bit\" 257 9 NIL NIL NIL NIL)(\"text\" \"html\" (\"charset\" \"utf-8\") NIL NIL \"quoted-printable\" 655 9 NIL NIL NIL NIL) \"alternative\" (\"boundary\" \"001a1137a5047848dd05157ddaa1\") NIL)(\"application\" \"pdf\" (\"name\" \"test.xml\" \"x-apple-part-url\" \"9D00D9A2-98AB-4EFB-85BA-FB255F8BF3D7\") NIL NIL \"base64\" 4383638 NIL (\"attachment\" (\"filename\" \"test.xml\")) NIL NIL) \"mixed\" (\"boundary\" \"001a1137a5047848e405157ddaa3\") NIL))\r\n"



-- 
https://bugs.ruby-lang.org/