[前][次][番号順一覧][スレッド一覧]

ruby-changes:34651

From: usa <ko1@a...>
Date: Mon, 7 Jul 2014 12:13:43 +0900 (JST)
Subject: [ruby-changes:34651] usa:r46734 (ruby_2_0_0): merge revision(s) 46331: [Backport #9885]

usa	2014-07-07 12:13:37 +0900 (Mon, 07 Jul 2014)

  New Revision: 46734

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46734

  Log:
    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
      [ruby-core:62864] [Bug #9885]
      Patch by @rayners (David Raynes). [Fixes GH-622] 
      https://github.com/ruby/ruby/pull/622

  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/test/net/imap/test_imap_response_parser.rb
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 46733)
+++ ruby_2_0_0/ChangeLog	(revision 46734)
@@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Mon Jul  7 12:13:09 2014  Shugo Maeda  <shugo@r...>
+
+	* lib/net/imap.rb (body_type_1part): Gmail IMAP reports a body
+	  type as "MIXED" followed immediately by params
+	  [ruby-core:62864] [Bug #9885]
+	  Patch by @rayners (David Raynes). [Fixes GH-622] 
+	  https://github.com/ruby/ruby/pull/622
+
 Mon Jul  7 12:05:28 2014  Shugo Maeda  <shugo@r...>
 
 	* lib/net/imap.rb (body_type_msg): should accept
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 46733)
+++ ruby_2_0_0/version.h	(revision 46734)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-07-07"
-#define RUBY_PATCHLEVEL 518
+#define RUBY_PATCHLEVEL 519
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 7
Index: ruby_2_0_0/test/net/imap/test_imap_response_parser.rb
===================================================================
--- ruby_2_0_0/test/net/imap/test_imap_response_parser.rb	(revision 46733)
+++ ruby_2_0_0/test/net/imap/test_imap_response_parser.rb	(revision 46734)
@@ -248,4 +248,14 @@ EOF https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/net/imap/test_imap_response_parser.rb#L248
     assert_equal("7BIT", delivery_status.encoding)
     assert_equal(410, delivery_status.size)
   end
+
+  def test_mixed_boundry
+    parser = Net::IMAP::ResponseParser.new
+    response = parser.parse("* 2688 FETCH (UID 179161 BODYSTRUCTURE ((\"TEXT\" \"PLAIN\" (\"CHARSET\" \"iso-8859-1\") NIL NIL \"QUOTED-PRINTABLE\" 200 4 NIL NIL NIL)(\"MESSAGE\" \"DELIVERY-STATUS\" NIL NIL NIL \"7BIT\" 318 NIL NIL NIL)(\"MESSAGE\" \"RFC822\" NIL NIL NIL \"7BIT\" 2177 (\"Tue, 11 May 2010 18:28:16 -0400\" \"Re: Welcome letter\" ((\"David\" NIL \"info\" \"xxxxxxxx.si\")) ((\"David\" NIL \"info\" \"xxxxxxxx.si\")) ((\"David\" NIL \"info\" \"xxxxxxxx.si\")) ((\"Doretha\" NIL \"doretha.info\" \"xxxxxxxx.si\")) NIL NIL \"<AC1D15E06EA82F47BDE18E851CC32F330717704E@localdomain>\" \"<AANLkTikKMev1I73L2E7XLjRs67IHrEkb23f7ZPmD4S_9@localdomain>\") (\"MIXED\" (\"BOUNDARY\" \"000e0cd29212e3e06a0486590ae2\") NIL NIL) 37 NIL NIL NIL) \"REPORT\" (\"BOUNDARY\" \"16DuG.4XbaNOvCi.9ggvq.8Ipnyp3\" \"REPORT-TYPE\" \"delivery-status\") NIL NIL))\r\n")
+    empty_part = response.data.attr['BODYSTRUCTURE'].parts[2]
+    assert_equal(empty_part.lines, 37)
+    assert_equal(empty_part.body.media_type, 'MULTIPART')
+    assert_equal(empty_part.body.subtype, 'MIXED')
+    assert_equal(empty_part.body.param['BOUNDARY'], '000e0cd29212e3e06a0486590ae2')
+  end
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]