diff options
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 |