cURL / Mailing Lists / curl-library / Single Mail


Re: ftp SIZE command and ASCII/BINARY mode

From: Max Katsev <>
Date: Sat, 22 Sep 2007 00:17:06 +0300

> Really? Sounds like a bug then...
In ftp.c, ftp_state_post_mdtm there is a check

"if(conn->bits.no_body && data->set.include_header && ftp->file &&
     ftp_need_type(conn, data->set.prefer_ascii)) "

 and type is set only if it is true, so on some servers it will work
with NOBODY, but for some you must set HEADER as well.

It seems to be intended, because they do set HEADER to TRUE in example
ftpuploadresume.c (I thought that it is needed only if you want to
parse headers manually in HEADERFUNCTION...) and there is something
about it in comments as well, but it seems to be unobvious design
desicion :)
Received on 2007-09-21