cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp SIZE command and ASCII/BINARY mode

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 21 Sep 2007 11:38:03 -0700

On Fri, Sep 21, 2007 at 09:20:28PM +0300, Max Katsev wrote:
> I try to find out file size on ftp. I set CURLOPT_NOBODY to 1, curl
> makes SIZE request, but it doesn't set transfer mode. For my server
> default mode is ASCII and it replies "550 SIZE not allowed in ASCII
> mode"
> What I do now is setting TYPE using CURLOPT_QUOTE. Is there a better way?

What version of curl are you using? Both 7.16.2 and 7.17.0 send a TYPE I
command before the SIZE command for me, using the command
curl -v -I ftp://ftp.example.com/testfile

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-09-21