Refine the parsing of response status line; add UT for utility.
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user