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

ruby-changes:40717

From: usa <ko1@a...>
Date: Mon, 30 Nov 2015 20:56:22 +0900 (JST)
Subject: [ruby-changes:40717] usa:r52796 (ruby_2_1): merge revision(s) 52683, 52684: [Backport #11719] [Backport #11722]

usa	2015-11-30 20:56:05 +0900 (Mon, 30 Nov 2015)

  New Revision: 52796

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

  Log:
    merge revision(s) 52683,52684: [Backport #11719] [Backport #11722]
    
    * lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"
      header.
    
    * test/net/http/test_http.rb: added test.
    
    * Added missing reference of GitHub
      header. [fix GH-949]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/lib/net/http.rb
    branches/ruby_2_1/test/net/http/test_http.rb
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 52795)
+++ ruby_2_1/ChangeLog	(revision 52796)
@@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Mon Nov 30 20:54:22 2015  SHIBATA Hiroshi  <hsbt@r...>
+
+	* Added missing reference of GitHub
+
+Mon Nov 30 20:54:22 2015  Trevor Rowe  <trevorrowe@g...>
+
+	* lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"
+	  header. [fix GH-949]
+	* test/net/http/test_http.rb: added test.
+
 Wed Nov 18 20:56:50 2015  NARUSE, Yui  <naruse@r...>
 
 	* ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
Index: ruby_2_1/lib/net/http.rb
===================================================================
--- ruby_2_1/lib/net/http.rb	(revision 52795)
+++ ruby_2_1/lib/net/http.rb	(revision 52796)
@@ -1417,11 +1417,11 @@ module Net   #:nodoc: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/lib/net/http.rb#L1417
 
           res.uri = req.uri
 
-          res.reading_body(@socket, req.response_body_permitted?) {
-            yield res if block_given?
-          }
           res
         }
+        res.reading_body(@socket, req.response_body_permitted?) {
+          yield res if block_given?
+        }
       rescue Net::OpenTimeout
         raise
       rescue Net::ReadTimeout, IOError, EOFError,
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 52795)
+++ ruby_2_1/version.h	(revision 52796)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.8"
-#define RUBY_RELEASE_DATE "2015-11-18"
-#define RUBY_PATCHLEVEL 421
+#define RUBY_RELEASE_DATE "2015-11-30"
+#define RUBY_PATCHLEVEL 422
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 18
+#define RUBY_RELEASE_DAY 30
 
 #include "ruby/version.h"
 
Index: ruby_2_1/test/net/http/test_http.rb
===================================================================
--- ruby_2_1/test/net/http/test_http.rb	(revision 52795)
+++ ruby_2_1/test/net/http/test_http.rb	(revision 52796)
@@ -822,6 +822,22 @@ class TestNetHTTPContinue < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/test/net/http/test_http.rb#L822
     assert_not_match(/HTTP\/1.1 100 continue/, @debug.string)
   end
 
+  def test_expect_continue_error_before_body
+    @log_tester = nil
+    mount_proc {|req, res|
+      raise WEBrick::HTTPStatus::Forbidden
+    }
+    start {|http|
+      uheader = {'content-length' => '5', 'expect' => '100-continue'}
+      http.continue_timeout = 1 # allow the server to respond before sending
+      http.request_post('/continue', 'data', uheader) {|res|
+        assert_equal(res.code, '403')
+      }
+    }
+    assert_match(/Expect: 100-continue/, @debug.string)
+    assert_not_match(/HTTP\/1.1 100 continue/, @debug.string)
+  end
+
   def test_expect_continue_error_while_waiting
     mount_proc {|req, res|
       res.status = 501

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r52683-52684


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

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