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
+10 -2
View File
@@ -27,11 +27,19 @@ public:
status_ = status;
}
// Set start line according to status code.
const std::string& reason() const {
return reason_;
}
void set_reason(const std::string& reason) {
reason_ = reason;
}
void Prepare() override;
private:
int status_;
int status_; // Status code
std::string reason_; // Reason phrase
};
} // namespace webcc