* lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
if given URI object is https. patched by Mark Ferlatte [ruby-core:40665] [Bug #5545] * lib/net/http.rb (Net::HTTP.post_form): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9d4db2d4d9
commit
708d76a3b1
@ -1,3 +1,11 @@
|
|||||||
|
Sat Nov 26 20:41:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
|
||||||
|
if given URI object is https.
|
||||||
|
patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]
|
||||||
|
|
||||||
|
* lib/net/http.rb (Net::HTTP.post_form): ditto.
|
||||||
|
|
||||||
Sat Nov 26 20:01:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
Sat Nov 26 20:01:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
|
* lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
|
||||||
|
@ -451,7 +451,8 @@ module Net #:nodoc:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
uri = uri_or_host
|
uri = uri_or_host
|
||||||
new(uri.hostname, uri.port).start {|http|
|
start(uri.hostname, uri.port,
|
||||||
|
:use_ssl => uri.scheme == 'https') {|http|
|
||||||
return http.request_get(uri.request_uri, &block)
|
return http.request_get(uri.request_uri, &block)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -479,7 +480,8 @@ module Net #:nodoc:
|
|||||||
req = Post.new(url.request_uri)
|
req = Post.new(url.request_uri)
|
||||||
req.form_data = params
|
req.form_data = params
|
||||||
req.basic_auth url.user, url.password if url.user
|
req.basic_auth url.user, url.password if url.user
|
||||||
new(url.hostname, url.port).start {|http|
|
start(url.hostname, url.port,
|
||||||
|
:use_ssl => uri.scheme == 'https' ) {|http|
|
||||||
http.request(req)
|
http.request(req)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user