[ftputil] FTP Through HTTP Proxy

Alexander Michael lxander.m at gmail.com
Tue Mar 27 16:33:54 CEST 2007


On 3/26/07, Stefan Schwarzer <sschwarzer at sschwarzer.net> wrote:
> The HTTP proxy and FTP proxy are independent [of] each other (with
> the exception that the provider may use the same host for both
> proxies, but also then you can treat the proxies as independent).
> So if you use the ftp:// protocol, the HTTP proxy shouldn't
> matter at all.

Actually, that's just it, they're not independent. With a little more
digging with Google, I've discovered that this mechanism for accessing
a remote FTP site over an HTTP proxy is called "FTP-over-HTTP" or
sometimes simply HFTP. Apparently, RFC 2616 (HTTP/1.1) accommodates
this mechanism for proxies and gateways with the Host header field.
When typing the "ftp" URL in Firefox configured to use a proxy,
Firefox actually sends the request via HTTP to the HTTP proxy server
and the proxy server acts as the FTP client with the remote FTP
server. The HTTP proxy then responds to the web browser via HTTP with
contents of the FTP URL.

> To my surprise, the environment variable is usually ftp_proxy
> (lowercase) though generally environment variables are all
> uppercase. Please try the lowercase va

Well, the curl man page listed it in upper case, but this is a moot
point for my issue now that I understand it.

> You shouldn't use complicated code unless you are sure you need
> it. :-) I suggest to try the direct login first if you haven't
> already done so.

Yeah. I was hoping to avoid this, but it has become clear to me what
is going on, and that I am forced to go this circuitous route.

I really appreciate the sanity checking here. Thanks for your help!

Alex

P.S. And yes, I am absolutely certain that our firewall is functioning
and that I must go through the proxy.


More information about the ftputil mailing list