diff --git a/ChangeLog b/ChangeLog index 2f632b39..30533bd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-16 Tatsuhiro Tsujikawa + + Reverted previous change and fixed it in a right way. + * src/HttpDownloadCommand.cc + 2010-07-16 Tatsuhiro Tsujikawa Make sure that all decoders are finished to pool socket diff --git a/src/HttpDownloadCommand.cc b/src/HttpDownloadCommand.cc index 74c49f58..52ba1ed7 100644 --- a/src/HttpDownloadCommand.cc +++ b/src/HttpDownloadCommand.cc @@ -89,9 +89,10 @@ bool HttpDownloadCommand::prepareForNextSegment() { (getRequest()->isKeepAliveEnabled() && ( // Make sure that all decoders are finished to pool socket - ((getTransferEncodingDecoder().isNull() || - getTransferEncodingDecoder()->finished()) && - (getContentEncodingDecoder().isNull() || + ((!getTransferEncodingDecoder().isNull() && + getTransferEncodingDecoder()->finished()) || + (getTransferEncodingDecoder().isNull() && + !getContentEncodingDecoder().isNull() && getContentEncodingDecoder()->finished())) || getRequestEndOffset() == getFileEntry()->gtoloff(getSegments().front()->getPositionToWrite())