mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
* lib/net/http.rb (proxy_user): retrieve proxy user from http_proxy.
* lib/net/http.rb (proxy_pass): retrieve proxy password from http_proxy. Patch by Rafael dos Santos Silva. [fix GH-763] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ce80a49f38
commit
68f7424bde
2 changed files with 16 additions and 2 deletions
|
@ -1059,12 +1059,20 @@ module Net #:nodoc:
|
|||
|
||||
# The proxy username, if one is configured
|
||||
def proxy_user
|
||||
@proxy_user
|
||||
if @proxy_from_env then
|
||||
proxy_uri && proxy_uri.user
|
||||
else
|
||||
@proxy_user
|
||||
end
|
||||
end
|
||||
|
||||
# The proxy password, if one is configured
|
||||
def proxy_pass
|
||||
@proxy_pass
|
||||
if @proxy_from_env then
|
||||
proxy_uri && proxy_uri.password
|
||||
else
|
||||
@proxy_pass
|
||||
end
|
||||
end
|
||||
|
||||
alias proxyaddr proxy_address #:nodoc: obsolete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue