Project

General

Profile

Actions

Bug #11250

closed

open-uri broken when fetching from ftp over proxy

Added by g5078022 (g5078022 g5078022) almost 9 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:69523]

Description

Commit 24a52978d4e2fe59cfa57c216c1118dce5f81640 by akr broke open-uri when fetching from ftp:// servers over a proxy (ftp_proxy environment variable). Undoing that commit fixes the issue.

Updated by hsbt (Hiroshi SHIBATA) over 5 years ago

  • Assignee deleted (g5078022 (g5078022 g5078022))

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

  • Status changed from Open to Closed

Looking at the mentioned commit, I'm not sure how it is possible that the commit broke it. The only code change is:

-    http = klass.new(target_host, target_port)
+    http = proxy ? klass.new(target_host, target_port) : klass.new(target_host, target_port, nil)

proxy is always set if the request for ftp through http proxy. I tried a simple test setting the ftp_proxy environment variable:

$ ftp_proxy=http://proxy_addr ruby -ropen-uri -e "p open('ftp://target')"

And it does make a request to http://proxy_addr for GET ftp://target HTTP/1.1. So it certainly appears to be working. I also tried ruby 2.1.9 and got the same results.

Actions

Also available in: Atom PDF

Like0
Like0Like0