aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-24 09:39:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-24 09:39:56 +0000
commite7012a515cb4a66d11e4d22cba87d23ca748fbee (patch)
treec350285ba321a8474327bfba6900cefc2b610773 /lib
parent6b638af92f87fb2a0d8aeb43707e24b541aca856 (diff)
Now allow TYPE responses to be any 2xx code, and log if it isn't 200.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 49a1d82d0..f941fea37 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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)