mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:03:31 +03:00
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
This commit is contained in:
parent
edddf394b8
commit
c5ba0c2f54
5 changed files with 78 additions and 20 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue