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:
parent
fddd99f452
commit
02b384ff2e
1 changed files with 8 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue