ruby-changes:38076
From: naruse <ko1@a...>
Date: Sat, 4 Apr 2015 08:18:45 +0900 (JST)
Subject: [ruby-changes:38076] naruse:r50157 (trunk): * lib/net/http.rb (edit_path): use path which is absolute ftp url
naruse 2015-04-04 08:18:20 +0900 (Sat, 04 Apr 2015) New Revision: 50157 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50157 Log: * lib/net/http.rb (edit_path): use path which is absolute ftp url on using ftp_proxy. Modified files: trunk/ChangeLog trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 50156) +++ ChangeLog (revision 50157) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Apr 4 08:16:43 2015 NARUSE, Yui <naruse@r...> + + * lib/net/http.rb (edit_path): use path which is absolute ftp url + on using ftp_proxy. + Fri Apr 3 11:43:17 2015 Nobuyoshi Nakada <nobu@r...> * vm_eval.c (vm_call0_cfunc): update invoker arguments. Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 50156) +++ lib/net/http.rb (revision 50157) @@ -1083,8 +1083,12 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L1083 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/