Added 'Connection' header extraction.

This commit is contained in:
Denis Chaplygin 2019-08-19 14:22:54 +03:00
parent 86aebc0812
commit 92c7b6fbd1
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@ struct request
std::string uri; std::string uri;
std::string referrer; std::string referrer;
std::string agent; std::string agent;
std::string connection;
boost::asio::ip::address endpoint; boost::asio::ip::address endpoint;
}; };
} }

View File

@ -180,6 +180,11 @@ RequestParser::RequestStatus RequestParser::consume(http::request &current_reque
current_request.agent = current_header.value; current_request.agent = current_header.value;
} }
if (boost::iequals(current_header.name, "Connection"))
{
current_request.connection = current_header.value;
}
if (input == '\r') if (input == '\r')
{ {
state = internal_state::expecting_newline_3; state = internal_state::expecting_newline_3;