Skip to content

Commit c76d0e4

Browse files
committed
Allow leading and trailing whilespaces before/after header field values
1 parent 31e53d2 commit c76d0e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ inline int get_header_value_int(const Headers& headers, const char* key, int def
598598

599599
inline bool read_headers(Stream& strm, Headers& headers)
600600
{
601-
static std::regex re("(.+?): (.+?)\r\n");
601+
static std::regex re(R"((.+?):\s*(.+?)\s*\r\n)");
602602

603603
const auto bufsiz = 2048;
604604
char buf[bufsiz];

0 commit comments

Comments
 (0)