From 67f6ff7fa94cd9c3196bd264db29e65f25b0403d Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Thu, 3 Aug 2023 23:01:40 +0200 Subject: [PATCH] Fix CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR (#1634) --- httplib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httplib.h b/httplib.h index 6c074d2..96cb915 100644 --- a/httplib.h +++ b/httplib.h @@ -6723,9 +6723,9 @@ inline bool ClientImpl::read_response_line(Stream &strm, const Request &req, if (!line_reader.getline()) { return false; } #ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR - const static std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n"); -#else const static std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r?\n"); +#else + const static std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n"); #endif std::cmatch m;