curl-library
Bug in ftp_nextconnect? version: libcurl 7.21.1
Date: Wed, 15 Sep 2010 16:41:52 +0200
In ftp.c , function ftp_nextconnect, line 3395:
...
ftp->downloadsize = -1; /* unknown as of yet */
result = ftp_range(conn);
if(result)
;
else if(data->set.ftp_list_only || !ftpc->file) { <---
This check here, line 3395
/* The specified path ends with a slash, and therefore we think this
is a directory that is requested, use LIST. But before that we
need to set ASCII transfer mode. */
/* But only if a body transfer was requested. */
if(ftp->transfer == FTPTRANSFER_BODY) {
result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE);
if(result)
....
If a client has requested a NLST with (CURLOPT_DIRLISTONLY,1L) and after
receiving the result
does a request for a file, such as ftp://localhost/file.txt, the result will
be an
NLST being issued to the server again.
I think the else if should be:
...
else if(data->set.ftp_list_only && !ftpc->file) {
...
Or perhaps I did something strange in my test program...
/Mehmet.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-15