From 964fb5e5ca5823ce92e59b59426a8da0a48c9470 Mon Sep 17 00:00:00 2001 From: Umiade <61789956@qq.com> Date: Fri, 3 Jul 2020 19:17:04 +0800 Subject: [PATCH] Fix: regex can't match when proxy was set to some web debugger(e.g. Fiddler) (#553) Co-authored-by: Umiade --- httplib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index c7da6ac..849d58f 100644 --- a/httplib.h +++ b/httplib.h @@ -4456,7 +4456,7 @@ inline bool Client::read_response_line(Stream &strm, Response &res) { 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; if (std::regex_match(line_reader.ptr(), m, re)) {