* lib/net/http.rb (Net::HTTP#send_request): there is no response body

with HEAD request. Patch by @rodrigosaito [fix GH-520]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2015-01-02 12:07:04 +00:00
Родитель 57ee6eae5a
Коммит 2743ad8c25
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Jan 2 21:06:59 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* 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@gmail.com>
* test/net/http/test_http.rb (_test_send_request__HEAD): Added

Просмотреть файл

@ -1350,7 +1350,8 @@ module Net #:nodoc:
# 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