cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Dalglish, Tom <tdalglish_at_bear.com>
Date: Thu, 30 Aug 2007 18:21:21 -0400

Hi,

 

            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:

 

...

FTP Directory: ftp://ftp.gnu.org/</H2>

<PRE>

<A HREF="%2e%2e/"><IMG border="0"
SRC="http://pwsqd6:8080/squid-internal-static/icons/anthony-dirup.gif"
ALT="[DIRUP]"></A> Parent Directory (<A
HREF="%2f/">Root Directory</A>)

<A HREF="CRYPTO.README"><IMG border="0"
SRC="http://pwsqd6:8080/squid-internal-static/icons/anthony-link.gif"
ALT="[LINK]"></A> CRYPTO.README. . . . . . .
. . . Aug 20 2004 <A HREF="CRYPTO.README;type=i"><IMG
border="0"
SRC="http://pwsqd6:8080/squid-internal-static/icons/anthony-box.gif"
ALT="[DOWNLOAD]"></A> -> .message

 

            

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?

 

Many thanks,

 

Tom

 

 

Tom Dalglish

+1 973 793-7571

 

 

***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
Received on 2007-08-31