cURL / Mailing Lists / curl-users / Single Mail


Inconsistent request with dubious return code

From: gilles <>
Date: Thu, 17 Jul 2014 12:13:52 -0400

 I was testing an upload to a FTP server under the same file name,
such as:

  curl -T uploadfile -u user:passwd

 But I mistakenly wrote -O instead of -T.

 So my request is inconsistent because -O is for a download and
I specified no file name.

 I got "Remote file name has no length!" which is ok.

 And curl returned a directory listing instead [should programs
interpret an incorrectly formed request?].

 But the return code is 0!

 I would definitely expect to have a meaningful return code
in this case, because the intended action was not achieved.

 ~ Gilles

List admin:
Received on 2014-07-18