mirror of
https://github.com/curl/curl.git
synced 2026-06-20 03:35:38 +03:00
According to RFC959, CWD is supposed to return 250 on success, but
there seem to be non-compliant FTP servers out there that return 200, so we accept any '2xy' response now.
This commit is contained in:
parent
e0d8615ece
commit
028e9cc56f
1 changed files with 4 additions and 1 deletions
|
|
@ -726,7 +726,10 @@ CURLcode ftp_cwd(struct connectdata *conn, char *path)
|
|||
if (result)
|
||||
return result;
|
||||
|
||||
if (ftpcode != 250) {
|
||||
/* According to RFC959, CWD is supposed to return 250 on success, but
|
||||
there seem to be non-compliant FTP servers out there that return 200,
|
||||
so we accept any '2xy' code here. */
|
||||
if (ftpcode/100 != 2) {
|
||||
failf(conn->data, "Couldn't cd to %s", path);
|
||||
return CURLE_FTP_ACCESS_DENIED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue