Refine the streaming, add UT, add error handling.

This commit is contained in:
Chunting Gu
2019-08-09 16:10:16 +08:00
parent c669551552
commit feae9b7acc
17 changed files with 316 additions and 212 deletions
+6 -2
View File
@@ -13,9 +13,13 @@ namespace webcc {
RequestParser::RequestParser() : request_(nullptr) {
}
void RequestParser::Init(Request* request) {
Parser::Init(request);
bool RequestParser::Init(Request* request, bool stream) {
if (!Parser::Init(request, stream)) {
return false;
}
request_ = request;
return true;
}
bool RequestParser::ParseStartLine(const std::string& line) {