1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Now allow TYPE responses to be any 2xx code, and log if it isn't 200.

This commit is contained in:
Daniel Stenberg 2005-05-24 09:39:56 +00:00
parent 6b638af92f
commit e7012a515c

View File

@ -1826,10 +1826,17 @@ static CURLcode ftp_state_type_resp(struct connectdata *conn,
CURLcode result = CURLE_OK;
struct SessionHandle *data=conn->data;
if(ftpcode != 200) {
if(ftpcode/100 != 2) {
/* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a
successful 'TYPE I'. While that is not as RFC959 says, it is still a
positive response code and we allow that. */
failf(data, "Couldn't set desired mode");
return CURLE_FTP_COULDNT_SET_BINARY; /* FIX */
}
if(ftpcode != 200)
infof(data, "Got a %03d response code instead of the assumed 200\n",
ftpcode);
if(instate == FTP_TYPE)
result = ftp_state_post_type(conn);
else if(instate == FTP_LIST_TYPE)