aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-02-18 23:40:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-04-12 23:59:37 +0200
commitc5ba0c2f5446532798ff68b598326f5f994616c1 (patch)
tree29fa64ced4062750866fa2089bf756e3535089dc /lib/ftp.c
parentedddf394b8634079a0b7c43c126e33ed9fa578b1 (diff)
FTP: handle a 230 welcome response
...instead of the 220 we otherwise expect. Made the ftpserver.pl support sending a custom "welcome" and then created test 1219 to verify this fix with such a 230 welcome. Bug: http://curl.haxx.se/mail/lib-2013-02/0102.html Reported by: Anders Havn
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 5308b2fa2..fb7c5737e 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2711,7 +2711,10 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
/* we have now received a full FTP server response */
switch(ftpc->state) {
case FTP_WAIT220:
- if(ftpcode != 220) {
+ if(ftpcode == 230)
+ /* 230 User logged in - already! */
+ return ftp_state_user_resp(conn, ftpcode, ftpc->state);
+ else if(ftpcode != 220) {
failf(data, "Got a %03d ftp-server response when 220 was expected",
ftpcode);
return CURLE_FTP_WEIRD_SERVER_REPLY;