aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 3f4b23fe7..caca95e95 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -621,6 +621,23 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
infof(data, "We have successfully logged in\n");
}
+ else if(ftpcode == 332) {
+ /* 332 Please provide account info */
+ if(data->set.ftp_account) {
+ FTPSENDF(conn, "ACCT %s", data->set.ftp_account);
+ result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
+ if(!result && (ftpcode != 230)) {
+ failf(data, "ACCT rejected by server: %03d", ftpcode);
+ result = CURLE_FTP_WEIRD_PASS_REPLY; /* FIX */
+ }
+ }
+ else {
+ failf(data, "ACCT requested by none available");
+ result = CURLE_FTP_WEIRD_PASS_REPLY;
+ }
+ if(result)
+ return result;
+ }
else {
failf(data, "Odd return code after PASS");
return CURLE_FTP_WEIRD_PASS_REPLY;