cURL / Mailing Lists / curl-users / Single Mail

curl-users

Inconsistent request with dubious return code

From: gilles <g1201_at_myriade.ca>
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 ftp://ftp.upload.com/

 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: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-07-18