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
+4 -3
View File
@@ -7,9 +7,10 @@ namespace webcc {
std::string RandomUuid();
// Split a string to two parts by the given token.
bool Split2(const std::string& str, char token, std::string* part1,
std::string* part2);
// Split a key-value string.
// E.g., split "Connection: Keep-Alive".
bool SplitKV(const std::string& str, char delimiter,
std::string* key, std::string* value);
} // namespace webcc