From b18e62dba74f75f89aab830dd961af231da06119 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 5 Feb 2014 21:20:09 +0900 Subject: Treat 30X response without Location header field as error This is required to make segmented download work. --- src/HttpResponseCommand.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/HttpResponseCommand.cc') 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)); } -- cgit