diff --git a/ChangeLog b/ChangeLog index 84e84133..deead32c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-22 Tatsuhiro Tsujikawa + + Fixed the bug that causes time out when redirection occurs with + content-length 0. + * src/HttpResponseCommand.cc + * src/HttpSkipResponseCommand.cc + * src/HttpSkipResponseCommand.h + 2008-10-22 Tatsuhiro Tsujikawa Now each status legends is shown only when it appears in Download diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index e8cedc95..d7236ea7 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -290,6 +290,8 @@ bool HttpResponseCommand::skipResponseBody if(httpResponse->getEntityLength() == 0 && !httpResponse->isTransferEncodingSpecified()) { command->setStatusRealtime(); + // If entity length == 0, then socket read/write check must be disabled. + command->disableSocketCheck(); e->setNoWait(true); } diff --git a/src/HttpSkipResponseCommand.cc b/src/HttpSkipResponseCommand.cc index 5d63a9c0..313eed7d 100644 --- a/src/HttpSkipResponseCommand.cc +++ b/src/HttpSkipResponseCommand.cc @@ -157,4 +157,10 @@ bool HttpSkipResponseCommand::processResponse() } } +void HttpSkipResponseCommand::disableSocketCheck() +{ + disableReadCheckSocket(); + disableWriteCheckSocket(); +} + } // namespace aria2 diff --git a/src/HttpSkipResponseCommand.h b/src/HttpSkipResponseCommand.h index f0af1e60..9cae544e 100644 --- a/src/HttpSkipResponseCommand.h +++ b/src/HttpSkipResponseCommand.h @@ -70,6 +70,8 @@ public: virtual ~HttpSkipResponseCommand(); void setTransferEncodingDecoder(const SharedHandle& decoder); + + void disableSocketCheck(); }; } // namespace aria2