summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-02-05 21:20:09 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2014-02-05 21:20:09 +0900
commitb18e62dba74f75f89aab830dd961af231da06119 (patch)
treea91a274723c8400b05be2c8d71a45d8a634053f1 /src/HttpResponseCommand.cc
parentec4b7297047ec181860049d66e71c03317f1fdc3 (diff)
Treat 30X response without Location header field as error
This is required to make segmented download work.
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 622736d3..d6dbd7a9 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -231,11 +231,10 @@ bool HttpResponseCommand::executeInternal()
#endif // ENABLE_MESSAGE_DIGEST
}
- if (statusCode == 404) {
- grp->increaseAndValidateFileNotFoundCount();
- return skipResponseBody(std::move(httpResponse));
- }
- if (statusCode >= 400 || statusCode == 304 || httpResponse->isRedirect()) {
+ if(statusCode >= 300) {
+ if(statusCode == 404) {
+ grp->increaseAndValidateFileNotFoundCount();
+ }
return skipResponseBody(std::move(httpResponse));
}