diff --git a/lib/ftp.c b/lib/ftp.c index a79f94277f287b39180c33c99d83c89e04704f90..ed4709d923a0ae8d47cd40b3ea56f9d3c237f941 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -391,6 +391,9 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ if(ftpcode) *ftpcode=code; /* return the initial number like this */ + /* store the latest code for later retrieval */ + conn->data->info.httpcode=code; + return result; } diff --git a/lib/urldata.h b/lib/urldata.h index 2592357d2648fb852b04158507bb479a79eecc7d..907bb5dc631e01e21d280dfbec334dcb663f5b7c 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -565,7 +565,7 @@ struct connectdata { * Struct to keep statistical and informational data. */ struct PureInfo { - int httpcode; + int httpcode; /* Recent HTTP or FTP response code */ int httpproxycode; int httpversion; long filetime; /* If requested, this is might get set. Set to -1 if the time