summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_operate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 0aad54282..8eac65d6a 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1570,9 +1570,13 @@ static CURLcode operate_do(struct GlobalConfig *global,
}
} /* if CURLE_OK */
else if(result) {
+ long protocol;
+
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
+ curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
- if(response/100 == 4)
+ if((protocol == CURLPROTO_FTP || protocol == CURLPROTO_FTPS) &&
+ response / 100 == 4)
/*
* This is typically when the FTP server only allows a certain
* amount of users and we are not one of them. All 4xx codes