Skip to content

Commit

Permalink
Fix CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexodia committed Aug 3, 2023
1 parent c7ed179 commit 632df5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 632df5f

Please sign in to comment.