curl-library
Re: libcurl's easy API , CURLOPT_QUOTE and errors
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.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-06-18