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
@@ -41,9 +41,13 @@ void SplitStartLine(const std::string& line, std::vector<std::string>* parts) {
ResponseParser::ResponseParser() : response_(nullptr) {
}
void ResponseParser::Init(Response* response, bool stream) {
Parser::Init(response, stream);
bool ResponseParser::Init(Response* response, bool stream) {
if (!Parser::Init(response, stream)) {
return false;
}
response_ = response;
return true;
}
bool ResponseParser::ParseStartLine(const std::string& line) {