Use Case: FTP via Proxy


I have an HTTP proxy that can handle ftp: URLs. I want to send HTTP requests for ftp: URLs to that proxy.


Contributed by Harm de Laat on the user mailing list. See also bug 37988 for HttpClient 3.x


HttpClient can not handle ftp: URLs directly, but must be able to send them to the proxy anyway. For 3.x, this requires registering the ftp protocol along with a protocol socket factory (see original mail). The same applies for other non-HTTP protocols that may be handled by a proxy, such as gopher:.

URLs may include authentication information required by the proxy, such as uid:pwd for the FTP server. HttpClient used to strip authentication information from URLs, because it is not required as long as authentication is handled by HttpClient directly.

UseCases/FTPviaProxy (last edited 2009-09-20 21:46:26 by localhost)