Project

General

Profile

Bug #11250

open-uri broken when fetching from ftp over proxy

Added by g5078022 (g5078022 g5078022) about 4 years ago. Updated 9 days ago.

Status:
Closed
Priority:
Normal
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.

History

Updated by hsbt (Hiroshi SHIBATA) 8 months ago

  • Assignee deleted (g5078022 (g5078022 g5078022))

Updated by jeremyevans0 (Jeremy Evans) 9 days 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.

Also available in: Atom PDF