ruby-changes:40659
From: nagachika <ko1@a...>
Date: Wed, 25 Nov 2015 00:04:45 +0900 (JST)
Subject: [ruby-changes:40659] nagachika:r52738 (ruby_2_2): merge revision(s) 52683, 52684: [Backport #11719] [Backport #11722]
nagachika 2015-11-25 00:04:36 +0900 (Wed, 25 Nov 2015) New Revision: 52738 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52738 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_2/ Modified files: branches/ruby_2_2/ChangeLog branches/ruby_2_2/lib/net/http.rb branches/ruby_2_2/test/net/http/test_http.rb branches/ruby_2_2/version.h Index: ruby_2_2/ChangeLog =================================================================== --- ruby_2_2/ChangeLog (revision 52737) +++ ruby_2_2/ChangeLog (revision 52738) @@ -1,3 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1 +Wed Nov 25 00:03:42 2015 SHIBATA Hiroshi <hsbt@r...> + + * Added missing reference of GitHub + +Wed Nov 25 00:03:42 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. + Mon Nov 23 00:19:51 2015 Koichi Sasada <ko1@a...> * vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc is Index: ruby_2_2/lib/net/http.rb =================================================================== --- ruby_2_2/lib/net/http.rb (revision 52737) +++ ruby_2_2/lib/net/http.rb (revision 52738) @@ -1417,11 +1417,11 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/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_2/version.h =================================================================== --- ruby_2_2/version.h (revision 52737) +++ ruby_2_2/version.h (revision 52738) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1 #define RUBY_VERSION "2.2.4" -#define RUBY_RELEASE_DATE "2015-11-23" -#define RUBY_PATCHLEVEL 194 +#define RUBY_RELEASE_DATE "2015-11-25" +#define RUBY_PATCHLEVEL 195 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 23 +#define RUBY_RELEASE_DAY 25 #include "ruby/version.h" Index: ruby_2_2/test/net/http/test_http.rb =================================================================== --- ruby_2_2/test/net/http/test_http.rb (revision 52737) +++ ruby_2_2/test/net/http/test_http.rb (revision 52738) @@ -826,6 +826,22 @@ class TestNetHTTPContinue < Test::Unit:: https://github.com/ruby/ruby/blob/trunk/ruby_2_2/test/net/http/test_http.rb#L826 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_2 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r52683-52684 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/