Treat response is completed if EOF is received before streamFilter completes

This commit is contained in:
Tatsuhiro Tsujikawa 2013-05-04 22:44:08 +09:00
parent b886ade311
commit 4410f0e56c

View File

@ -148,13 +148,17 @@ bool HttpSkipResponseCommand::executeInternal()
return processResponse();
}
if(eof) {
// we may get EOF before non-sink streamFilter reports its
// completion. There are some broken servers to prevent
// streamFilter from completion. Since we just discard the
// response body anyway, so we assume that the response is
// completed.
return processResponse();
}
bool finished = false;
if(sinkFilterOnly_) {
if(eof) {
return processResponse();
} else {
finished = (totalLength_ == receivedBytes_);
}
finished = (totalLength_ == receivedBytes_);
} else {
finished = streamFilter_->finished();
}