mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-25 12:14:41 +00:00
Allow leading and trailing whilespaces before/after header field values
This commit is contained in:
1 parent
31e53d21e4
commit
c76d0e4ab3
1 file changed
+1
-1
@@ -598,7 +598,7 @@ inline int get_header_value_int(const Headers& headers, const char* key, int def
|
|||||||
|
|
||||||
inline bool read_headers(Stream& strm, Headers& headers)
|
inline bool read_headers(Stream& strm, Headers& headers)
|
||||||
{
|
{
|
||||||
static std::regex re("(.+?): (.+?)\r\n");
|
static std::regex re(R"((.+?):\s*(.+?)\s*\r\n)");
|
||||||
|
|
||||||
const auto bufsiz = 2048;
|
const auto bufsiz = 2048;
|
||||||
char buf[bufsiz];
|
char buf[bufsiz];
|
||||||
|
|||||||
Reference in new issue
Block a user