mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:33:38 +03:00
ftp: treat server's response 421 as CURLE_OPERATION_TIMEDOUT
Bug: https://bugzilla.redhat.com/650255 Reported by: Simon H.
This commit is contained in:
parent
7d8343934b
commit
12b2412c52
2 changed files with 7 additions and 0 deletions
|
|
@ -425,6 +425,12 @@ static CURLcode ftp_readresp(curl_socket_t sockfd,
|
|||
if(ftpcode)
|
||||
*ftpcode = code;
|
||||
|
||||
if(421 == code)
|
||||
/* 421 means "Service not available, closing control connection." and FTP
|
||||
* servers use it to signal that idle session timeout has been exceeded.
|
||||
* If we ignored the response, it could end up hanging in some cases. */
|
||||
return CURLE_OPERATION_TIMEDOUT;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue