Skip to content

Commit

Permalink
Header parsing assumes whitespace after colon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stewartbright committed May 18, 2016
1 parent 3070ca2 commit b6f2037
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Release/src/http/client/http_client_asio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,6 @@ class asio_context : public request_context, public std::enable_shared_from_this
if (colon != std::string::npos)
{
auto name = header.substr(0, colon);
auto value = header.substr(colon + 2, header.size() - (colon + 3)); // also exclude '\r'
boost::algorithm::trim(name);
boost::algorithm::trim(value);

Expand Down

0 comments on commit b6f2037

Please sign in to comment.