Retry after 404 status if --max-file-not-found > 0

pull/481/head
Tatsuhiro Tsujikawa 2015-10-24 01:15:43 +09:00
parent 2873b96ee7
commit 4bbc71c8e6
1 changed files with 5 additions and 2 deletions

View File

@ -211,8 +211,11 @@ bool HttpSkipResponseCommand::processResponse()
error_code::HTTP_AUTH_FAILED);
}
} else if(statusCode == 404) {
throw DL_ABORT_EX2(MSG_RESOURCE_NOT_FOUND,
error_code::RESOURCE_NOT_FOUND);
if(getOption()->getAsInt(PREF_MAX_FILE_NOT_FOUND) == 0) {
throw DL_ABORT_EX2(MSG_RESOURCE_NOT_FOUND,
error_code::RESOURCE_NOT_FOUND);
}
return prepareForRetry(0);
} else if(statusCode == 503) {
// Only retry if pretry-wait > 0. Hammering 'busy' server is not
// a good idea.