Rework the body of request and response

This commit is contained in:
Chunting Gu
2019-07-03 17:37:44 +08:00
parent b9f2ba6a41
commit 98aeeae012
39 changed files with 1122 additions and 677 deletions
+13 -9
View File
@@ -2,19 +2,12 @@
#include "boost/algorithm/string.hpp"
#include "webcc/response.h"
#include "webcc/logger.h"
#include "webcc/response.h"
namespace webcc {
ResponseParser::ResponseParser(Response* response)
: Parser(response), response_(response) {
}
void ResponseParser::Init(Response* response) {
Parser::Init(response);
response_ = response;
}
// -----------------------------------------------------------------------------
namespace {
@@ -43,6 +36,17 @@ void SplitStartLine(const std::string& line, std::vector<std::string>* parts) {
} // namespace
// -----------------------------------------------------------------------------
ResponseParser::ResponseParser(Response* response)
: Parser(response), response_(response) {
}
void ResponseParser::Init(Response* response) {
Parser::Init(response);
response_ = response;
}
bool ResponseParser::ParseStartLine(const std::string& line) {
std::vector<std::string> parts;
SplitStartLine(line, &parts);