mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Cache no proxy case
* lib/net/http.rb (Net::HTTP#proxy_uri): cache the case no proxy is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8ff99deda9
commit
5026a663ab
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Jun 28 15:20:18 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/net/http.rb (Net::HTTP#proxy_uri): cache the case no proxy
|
||||
is used.
|
||||
|
||||
Tue Jun 28 09:56:29 2016 Stefan Schussler <mail@stefanschuessler.de>
|
||||
|
||||
* object.c (rb_mod_eqq): [DOC] Fix typo in RDoc. [Fix GH-1393]
|
||||
|
|
|
@ -1049,9 +1049,11 @@ module Net #:nodoc:
|
|||
|
||||
# The proxy URI determined from the environment for this connection.
|
||||
def proxy_uri # :nodoc:
|
||||
return if @proxy_uri == false
|
||||
@proxy_uri ||= URI::HTTP.new(
|
||||
"http".freeze, nil, address, port, nil, nil, nil, nil, nil
|
||||
).find_proxy
|
||||
).find_proxy || false
|
||||
@proxy_uri || nil
|
||||
end
|
||||
|
||||
# The address of the proxy server, if one is configured.
|
||||
|
|
Loading…
Reference in a new issue