mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 01:54:00 +02:00
merge revision(s) 49104,49105: [Backport #10692]
* test/net/http/test_http.rb (_test_send_request__HEAD): Added failing test for send_request with HEAD method. * 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/branches/ruby_2_2@49278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dd52ab5a95
commit
008c7b108b
4 changed files with 24 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue