cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using curl for FTP downloads with a proxy. Turning of HTML markup on directory listings

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 31 Aug 2007 09:12:13 +0200 (CEST)

On Thu, 30 Aug 2007, Dalglish, Tom wrote:

> I am trying to use curl to FTP files across an HTTP (Squid)
> proxy. Getting files is just fine (e.g. ftp://ftp.gnu.org/welcome.msg
> returns a clear-text file) . But getting directory listings returns data
> marked up with HTML instead of the usual FTP listing. (e.g.
> ftp://ftp.gnu.org/) returns data like this:

[...]

> Is there a way to tell either CURL or Squid to NOT markup up my returned
> data, so I can get a normal FTP directory listing back?

libcurl just sends the request and brings the response back for you, it has
nothing to do with the contents.

In this case, FTP over a HTTP proxy is actually using HTTP and many proxies
will then provide the response exactly like this and you won't be able to do
anything about it.

Your options involve checking if squid can be configured to act differently,
check if you can use a different proxy that can do this or even if you can do
this operation without going through a proxy.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-08-31