diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-03 23:18:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-03 23:18:20 +0000 |
commit | 58835a94efd9fc8543c0c3243d2d70f59fce3786 (patch) | |
tree | 86a2b31b81fd3794cbebcd0a51b13f4b73deba60 /lib | |
parent | 819e1756adfd78e25492a9492771ba4390c2af48 (diff) |
* lib/net/http.rb (edit_path): use path which is absolute ftp url
on using ftp_proxy.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 37b6b82694..2fc541c2e8 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1083,8 +1083,12 @@ module Net #:nodoc: end def edit_path(path) - if proxy? and not use_ssl? then - "http://#{addr_port}#{path}" + if proxy? + if path.start_with?("ftp://") || use_ssl? + path + else + "http://#{addr_port}#{path}" + end else path end |