curl-library
Re: PRET + Customrequest (STAT) issue
Date: Mon, 17 Jan 2011 20:24:17 +0100 (CET)
On Mon, 17 Jan 2011, ElBandito wrote:
> For my at home usage I use a different ftp client and noticed it uses
> STAT -LA instead of LIST.
The "-LA" parts sounds like a gamle to rely on as its not part of any
standard.
> STAT -LA gets the dirlist through the control connection and doesn't
> open the additional data connection only to get a dirlist as LIST
> does.
Right, that's actually what STAT does, -LA is probably just a system- specific
variant of it.
> The way libcurl does it now with LIST looks the following (example
> taken from drftpd)
...
> So I looked through the libcurl docs and noticed CURLOPT_CUSTOMREQUEST, when
> set to STAT -LA on the same drftpd it fails though:
Yes, as long as you still ask for a file transfer as a file transfer in
regular FTP lingo means a separate connection for the data. You can set
CURLOPT_NOBODY to avoid that.
> The ftp server expects STAT -LA to come in without preceding PRET.
Isn't that contrary to the intent of and the exact PRET specification?
> As you can see libcurl always tries to PASV since well as the docs say
Unless you make it use EPSV, PORT or EPRT ...
> My question now is, is there a way to use STAT instead of LIST already
> which I've failed to notice ?
Apparently it's not possibly due to it not requiring PRET. But I must admit I
don't understand the logic for that, so I'm not really sure what the exact
best fix or improvement would be there.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-01-17