]> granicus.if.org Git - curl/commitdiff
Aleksandar Milivojevic reported a problem in the Redhat bugzilla (see
authorDaniel Stenberg <daniel@haxx.se>
Fri, 1 Oct 2004 11:22:11 +0000 (11:22 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 1 Oct 2004 11:22:11 +0000 (11:22 +0000)
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134133) and not to anyone
involved in the curl project! This happens when you try to curl a file from a
proftpd site using SSL. It seems proftpd sends a somewhat unorthodox PASS
response code (232 instead of 230). I relaxed the response code check to deal
with this and similar cases.

CHANGES
lib/ftp.c

diff --git a/CHANGES b/CHANGES
index 715e32bd2a0b0a398cd7c31b04f3ce879d28ac5c..c0348360fec8500cf225849177bc0dc3d65db481 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,13 @@
                                   Changelog
 
 Daniel (1 October 2004)
+- Aleksandar Milivojevic reported a problem in the Redhat bugzilla (see
+  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=134133) and not to
+  anyone involved in the curl project! This happens when you try to curl a
+  file from a proftpd site using SSL. It seems proftpd sends a somewhat
+  unorthodox response code (232 instead of 230). I relaxed the response code
+  check to deal with this and similar cases.
+
 - Based on Fedor Karpelevitch's formpost path basename patch, file parts in
   formposts no longer include the path part. If you _really_ want them, you
   must provide your preferred full file name with CURLFORM_FILENAME.
index e2431598d3b9b26297839c2c8abd729e555fbb12..96ea8433191af437243a3ab6739e45a7aa6d2c13 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -618,9 +618,11 @@ CURLcode Curl_ftp_connect(struct connectdata *conn)
       failf(data, "not logged in: %s", &buf[4]);
       return CURLE_FTP_USER_PASSWORD_INCORRECT;
     }
-    else if(ftpcode == 230) {
+    else if(ftpcode/100 == 2) {
       /* 230 User ... logged in.
-         (user successfully logged in) */
+         (user successfully logged in)
+
+         Apparently, proftpd with SSL returns 232 here at times. */
 
       infof(data, "We have successfully logged in\n");
     }