diff options
-rw-r--r-- | lib/ftp.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -677,12 +677,14 @@ CURLcode Curl_ftp_connect(struct connectdata *conn) if(result) return result; - if(ftpcode == 200) + if(ftpcode/100 == 2) /* We have enabled SSL for the data connection! */ conn->ssl[SECONDARYSOCKET].use = TRUE; - /* FTP servers typically responds with 500 if they decide to reject our 'P' request */ + else if(data->set.ftp_ssl> CURLFTPSSL_CONTROL) + /* we failed and bails out */ + return CURLE_FTP_SSL_FAILED; } } |