diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-10-24 01:15:43 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-10-24 01:15:43 +0900 |
| commit | 4bbc71c8e6c6aa7b5441e30da3a5efc5b810073a (patch) | |
| tree | 1d81dfd7d2bead41b2e1a9929b467d7b077be53a /src | |
| parent | 2873b96ee7549176174c0a6e5cacfce2b1c5fee9 (diff) | |
Retry after 404 status if --max-file-not-found > 0
Diffstat (limited to 'src')
| -rw-r--r-- | src/HttpSkipResponseCommand.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index d2149c1f..c3c573cc 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -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. |
