Skip to content

Commit b6f2037

Browse files
committed
Header parsing assumes whitespace after colon
RFC7230 (HTTP 1.1) 3.2 "Header fields" specifies that whitespace between colon and value is optional, but http_client_asio::read_headers started reading the value at one after the colon, assuming there would always be exactly one space.
1 parent 3070ca2 commit b6f2037

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Release/src/http/client/http_client_asio.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,6 @@ class asio_context : public request_context, public std::enable_shared_from_this
11231123
if (colon != std::string::npos)
11241124
{
11251125
auto name = header.substr(0, colon);
1126-
auto value = header.substr(colon + 2, header.size() - (colon + 3)); // also exclude '\r'
11271126
boost::algorithm::trim(name);
11281127
boost::algorithm::trim(value);
11291128

0 commit comments

Comments
 (0)