summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2015-02-11 19:51:57 +0100
committerPatrick Monnerat <pm@datasphere.ch>2015-02-11 19:51:57 +0100
commitab85ac5eda31945d5db17b3d235121d557064bf5 (patch)
tree8669b801972633e7a393f9114e4cfa29f7f1e764
parentd771b44e538aac30b29189fc5c0f3e0f2b668d93 (diff)
downloadcurl-ab85ac5eda31945d5db17b3d235121d557064bf5.tar.gz
ftp: accept all 2xx responses to the PORT command
-rw-r--r--lib/ftp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 68610f958..5aa617edd 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2102,7 +2102,9 @@ static CURLcode ftp_state_port_resp(struct connectdata *conn,
ftpport fcmd = (ftpport)ftpc->count1;
CURLcode result = CURLE_OK;
- if(ftpcode != 200) {
+ /* The FTP spec tells a positive response should have code 200.
+ Be more permissive here to tolerate deviant servers. */
+ if(ftpcode / 100 != 2) {
/* the command failed */
if(EPRT == fcmd) {