Changed HTTP.Read(Socket::Connection&) call to only return false if reading a whole request/response isn't possible (yet).

This commit is contained in:
Thulinma 2014-03-06 14:49:51 +01:00
parent fddd99f452
commit 02b384ff2e

View file

@ -326,7 +326,14 @@ bool HTTP::Parser::Read(Socket::Connection & conn){
return false;
}
}
return parse(conn.Received().get());
//if a parse succeeds, simply return true
if (parse(conn.Received().get())){
return true;
}
//otherwise, if we have parts left, call ourselves recursively
if (conn.Received().size()){
return Read(conn);
}
} //HTTPReader::Read
/// Attempt to read a whole HTTP request or response from a std::string buffer.