2008-10-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Fixed the bug that causes time out when redirection occurs with
	content-length 0.
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/HttpSkipResponseCommand.h
pull/1/head
Tatsuhiro Tsujikawa 2008-10-22 12:20:48 +00:00
parent e15d104d88
commit d538c9ae97
4 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2008-10-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
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 <tujikawa at rednoah dot com> 2008-10-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Now each status legends is shown only when it appears in Download Now each status legends is shown only when it appears in Download

View File

@ -290,6 +290,8 @@ bool HttpResponseCommand::skipResponseBody
if(httpResponse->getEntityLength() == 0 && if(httpResponse->getEntityLength() == 0 &&
!httpResponse->isTransferEncodingSpecified()) { !httpResponse->isTransferEncodingSpecified()) {
command->setStatusRealtime(); command->setStatusRealtime();
// If entity length == 0, then socket read/write check must be disabled.
command->disableSocketCheck();
e->setNoWait(true); e->setNoWait(true);
} }

View File

@ -157,4 +157,10 @@ bool HttpSkipResponseCommand::processResponse()
} }
} }
void HttpSkipResponseCommand::disableSocketCheck()
{
disableReadCheckSocket();
disableWriteCheckSocket();
}
} // namespace aria2 } // namespace aria2

View File

@ -70,6 +70,8 @@ public:
virtual ~HttpSkipResponseCommand(); virtual ~HttpSkipResponseCommand();
void setTransferEncodingDecoder(const SharedHandle<Decoder>& decoder); void setTransferEncodingDecoder(const SharedHandle<Decoder>& decoder);
void disableSocketCheck();
}; };
} // namespace aria2 } // namespace aria2