cURL / Mailing Lists / curl-library / Single Mail


Re: libcurl's easy API , CURLOPT_QUOTE and errors

From: Daniel Stenberg <>
Date: Thu, 18 Jun 2015 14:57:30 +0200 (CEST)

On Thu, 18 Jun 2015, Jacques Klein wrote:

> I am using libcurl to interact with an FTP server and have to use
> CURLOPT_QUOTE in some cases.
> The problem is following; in case of error,
> curl_easy_strerror(rc) returns "Quote command returned error"
> which I can under understand from a developper point-of-view, but is of no
> help to the enduser.

No, I completely agree. libcurl errors are very rarely suitable for end users
and they're not really intended to be so.

> Is there an API to retrieve the error(s) that triggered the Quote error ?.

You can use the HEADERFUNCTION callback as that will show you the server
responses and the last one you get before "Quote command returned error" is
then the final response - the one that caused the error.

List admin:
Received on 2015-06-18