Bug #9885

lib/net/imap.rb: FETCH-ed BODYSTRUCTURE with "MIXED" body type fails

Added by David Raynes about 1 year ago. Updated about 1 year ago.

[ruby-core:62864]
Status:Closed
Priority:Normal
Assignee:-
ruby -v:ruby 2.2.0dev (2014-05-31 trunk 46263) [x86_64-darwin13] Backport:2.0.0: DONE, 2.1: DONE

Description

Gmail's IMAP server is giving me ("MIXED ("BOUNDARY" "abcdefgh") ..) for a the body portion of a message/rfc822 part and Net::IMAP raises an exception when parsing it.

I've got a pull request w/ test just about ready to go. Will post URL here shortly.

Associated revisions

Revision 46331
Added by Shugo Maeda about 1 year ago

  • lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body type as "MIXED" followed immediately by params [Bug #9885]

Revision 46331
Added by Shugo Maeda about 1 year ago

  • lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body type as "MIXED" followed immediately by params [Bug #9885]

Revision 46617
Added by Tomoyuki Chikanaga about 1 year ago

merge revision(s) r46331: [Backport #9885]

* lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
  type as "MIXED" followed immediately by params
   [Bug #9885]
  Patch by @rayners (David Raynes). [Fixes GH-622] 
  https://github.com/ruby/ruby/pull/622

Revision 46734
Added by Usaku NAKAMURA about 1 year ago

merge revision(s) 46331: [Backport #9885]

* lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
  type as "MIXED" followed immediately by params
   [Bug #9885]
  Patch by @rayners (David Raynes). [Fixes GH-622] 
  https://github.com/ruby/ruby/pull/622

History

#2 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Feedback

Maybe a feature-request?

#3 Updated by David Raynes about 1 year ago

It feels more like a bug to me. The existing code throws a parsing exception when I fetch the bodystructure of the message in my inbox that prompted me to make this change. I have not dug deep enough into the RFCs yet to know how close this is or is not to the IMAP specs (to the best of my knowledge, this is not coming from any sort of new IMAP extension, though I do not discount that this could potentially be a bug in Google's IMAP implementation), and I know this is not the first delivery status notification email to have a problem with Net::IMAP.

#4 Updated by Shugo Maeda about 1 year ago

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

Applied in changeset r46331.


  • lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body type as "MIXED" followed immediately by params [Bug #9885]

#5 Updated by Shugo Maeda about 1 year ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED

#6 Updated by Tomoyuki Chikanaga about 1 year ago

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

Backported into ruby_2_1 at r46617.

#7 Updated by Usaku NAKAMURA about 1 year ago

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

backported into ruby_2_0_0 at r46734.

Also available in: Atom PDF