ruby-changes:37024
From: hsbt <ko1@a...>
Date: Fri, 2 Jan 2015 21:07:11 +0900 (JST)
Subject: [ruby-changes:37024] hsbt:r49105 (trunk): * lib/net/http.rb (Net::HTTP#send_request): there is no response body
hsbt 2015-01-02 21:07:04 +0900 (Fri, 02 Jan 2015) New Revision: 49105 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49105 Log: * lib/net/http.rb (Net::HTTP#send_request): there is no response body with HEAD request. Patch by @rodrigosaito [fix GH-520] Modified files: trunk/ChangeLog trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 49104) +++ ChangeLog (revision 49105) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jan 2 21:06:59 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * lib/net/http.rb (Net::HTTP#send_request): there is no response body + with HEAD request. Patch by @rodrigosaito [fix GH-520] + Fri Jan 2 21:04:36 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> * test/net/http/test_http.rb (_test_send_request__HEAD): Added Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 49104) +++ lib/net/http.rb (revision 49105) @@ -1350,7 +1350,8 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1350 # puts response.body # def send_request(name, path, data = nil, header = nil) - r = HTTPGenericRequest.new(name,(data ? true : false),true,path,header) + has_response_body = name != 'HEAD' + r = HTTPGenericRequest.new(name,(data ? true : false),has_response_body,path,header) request r, data end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/