mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 09:43:51 +00:00
Fix: regex can't match when proxy was set to some web debugger(e.g. Fiddler) (#553)
Co-authored-by: Umiade <hanyuchao@corp.netease.com>
This commit is contained in:
parent
c4f3f9529b
commit
964fb5e5ca
@ -4456,7 +4456,7 @@ inline bool Client::read_response_line(Stream &strm, Response &res) {
|
|||||||
|
|
||||||
if (!line_reader.getline()) { return false; }
|
if (!line_reader.getline()) { return false; }
|
||||||
|
|
||||||
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)) {
|
if (std::regex_match(line_reader.ptr(), m, re)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user