mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-12 06:01:40 +00:00
Fix #731
This commit is contained in:
parent
ff5677ad19
commit
c909ffa758
@ -4738,7 +4738,7 @@ inline bool ClientImpl::read_response_line(Stream &strm, Response &res) {
|
|||||||
const static std::regex re("(HTTP/1\\.[01]) (\\d+) (.*?)\r\n");
|
const static std::regex re("(HTTP/1\\.[01]) (\\d+) (.*?)\r\n");
|
||||||
|
|
||||||
std::cmatch m;
|
std::cmatch m;
|
||||||
if (!std::regex_match(line_reader.ptr(), m, re)) { return false; }
|
if (!std::regex_match(line_reader.ptr(), m, re)) { return true; }
|
||||||
res.version = std::string(m[1]);
|
res.version = std::string(m[1]);
|
||||||
res.status = std::stoi(std::string(m[2]));
|
res.status = std::stoi(std::string(m[2]));
|
||||||
res.reason = std::string(m[3]);
|
res.reason = std::string(m[3]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user