From 23294a746e6ef71a0801eb30c295c71984556f7e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 8 Jun 2008 10:32:10 +0000 Subject: [PATCH] 2008-06-08 Tatsuhiro Tsujikawa Fixed the bug that HTTP downloads don't start with old libraries. * src/HttpHeaderProcessor.cc --- ChangeLog | 5 +++++ src/HttpHeaderProcessor.cc | 2 ++ 2 files changed, 7 insertions(+) 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; }