On Fri, 17 Dec 2010, Vishakha Vaidya wrote:

I have set the CURLOPT_ERRORBUFFER for an ftp connection, when I upload a file I get a 553 error response. However, I do not get the custom response received with it. I get the debug message that comes after this message. On debugging I found that the error buffer is SessionHandle's state.buffer. Now this buffer contains the custom message after getting the ftp response in Curl_pp_readresp (pingpong.c), however it gets replace by libcurl message "server did not report OK, got 553" in ftp_done(ftp.c<ftp://ftp.c>), I hence lose the custom message server sent. Is this designed to be like that ?

Not necessarily. CURLOPT_ERRORBUFFER is designed to get an error message about the particular error that occured. It has never been defined to get the exact error message that is contained in the FTP response sent from the server.

Is there a way I can the sever response in error buffer ?

No, but you can use the HEADERFUNCTION to get all "headers" which in the FTP case means all FTP responses.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to