cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: obtaining information about files or folders with MLST?

From: Ellié Computing Open Source Program <opensource_at_elliecomputing.com>
Date: Fri, 20 Apr 2012 10:43:28 +0200

>From: Daniel Stenberg
>On Thu, 19 Apr 2012, Ellié Computing Open Source Program wrote:
>
>> may I suggest a line of documentation in CURLOPT_HEADERFUNCTION
>> documentation telling that at least for FTP the control lines are
>> returned
>> there? the documentation for that option is solely about HTTP, it makes
>> it
>> really non obvious that it does something for other protocols. (if I knew
>> what it does for other protocols I'd propose a patch but I just know
>> about
>> FTP yet...)
>
>So please feel free to suggest what to add for FTP!
OK, I feel in a good day so I dug in the source of FTP.
now, I realize that there is a bizarre CURL_FTP_HTTPSTYLE_HEAD feature which
might pollute the server responses with HTTP-like results, these results are
written to both header (as are all the lines returned on the control
connection) and body. They can be distinguished from ftp response because
they neither start with a space (as do MLST or FEAT and so on) nor start
with a number.

What would you think of something like that (added at end of
CURLOPT_HEADERFUNCTION doc):

For the FTP protocol, all the lines of the response on the control
connection
are written to this callback. In addition, HTTP-like headers might be
written to
the callback when \fICURLOPT_FILETIME\fP or \fICURLOPT_NOBODY\fP options are
used.

Regards
Armel

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-20