Refine the parsing of response status line; add UT for utility.

This commit is contained in:
Chunting Gu
2019-05-31 13:43:44 +08:00
parent 78743e6a55
commit 2035c1f552
10 changed files with 81 additions and 21 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ bool Parser::GetNextLine(std::size_t off, std::string* line, bool erase) {
bool Parser::ParseHeaderLine(const std::string& line) {
Header header;
if (!Split2(line, ':', &header.first, &header.second)) {
if (!SplitKV(line, ':', &header.first, &header.second)) {
LOG_ERRO("Invalid header: %s", line.c_str());
return false;
}