cURL / Mailing Lists / curl-library / Single Mail


Re: avoid sending USER if empty

From: Dan Fandrich <>
Date: Fri, 25 Feb 2011 12:37:50 -0800

On Fri, Feb 25, 2011 at 01:52:36PM +0000, Vojtech Fried wrote:
> Is there any option to change the way libcurl handles ftp USER command? As I
> understand it, if I don?t tell libcurl the username, it defaults to sending ?
> anonymous?. If I use empty string as a username, libcurl sends empty username
> as a argument for USER command. This does not work for me, because my ftpserver
> (pyftpdlib be default returns ?501 Syntax
> error: command needs an argument.? And libcurl ends because login failed. I am
> not sure how common this is among ftpservers.
> What I would like is to avoid sending USER command if the username is empty. I
> can configure the ftpserver not to require a user login.

curl currently will always send a USER command for ftp. I looked at RFC959
and I didn't find anything that mandates that client must send USER, so it's
likely that what your server expects is within spec. But, are there any other
ftp clients out there that will allow logging in without USER? It seems
pretty unusual to me.

>>> Dan
List admin:
Received on 2011-02-25