diff --git a/ChangeLog b/ChangeLog index 2f7c6bda..2dbf74bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-08 Tatsuhiro Tsujikawa + + Fixed the bug that HTTP downloads don't start with old libraries. + * src/HttpHeaderProcessor.cc + 2008-06-08 Tatsuhiro Tsujikawa Use empty() instead of size() > 0. diff --git a/src/HttpHeaderProcessor.cc b/src/HttpHeaderProcessor.cc index 9dec5099..bf35d697 100644 --- a/src/HttpHeaderProcessor.cc +++ b/src/HttpHeaderProcessor.cc @@ -64,6 +64,7 @@ void HttpHeaderProcessor::checkHeaderLimit(size_t incomingLength) if((size_t)strm.tellg()+incomingLength > _limit) { throw DlAbortEx("Too large http header"); } + strm.clear(); } bool HttpHeaderProcessor::eoh() const @@ -107,6 +108,7 @@ SharedHandle HttpHeaderProcessor::getHttpResponseHeader() httpHeader->setResponseStatus(line.substr(9, 3)); httpHeader->setVersion(line.substr(0, 8)); httpHeader->fill(strm); + strm.clear(); return httpHeader; }