curl-library
Re: help with ftp error return code
Date: Wed, 20 Feb 2002 08:25:48 +0100 (MET)
On Tue, 19 Feb 2002, Wenjie Hua wrote:
> Is it possible for me to extract the original three-digit return code of
> FTP (say, 200)
Which is the "original" return code? curl issues something like 5-7 different
FTP commands for each single transfer, and they all return three-digit codes.
Since libcurl 7.9.3, when you set a header callback, you will get all the FTP
response lines sent to it for your own pleasure.
You thus can do this and then parse the lines for the return code yourself,
as RFC959 details. It really isn't very hard.
If you have ideas on how this might be improved or changed in a future
version, feel free to suggest/provide other ways to do this.
> curl_easy_perform currently return its own error code.
Yes, because it returns a single error code for the entire operation. There
is no corresponding single FTP server code like for example HTTP has.
I hope this helps.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-02-20