Added 'Connection' header extraction.
This commit is contained in:
parent
86aebc0812
commit
92c7b6fbd1
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -180,6 +180,11 @@ RequestParser::RequestStatus RequestParser::consume(http::request ¤t_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;
|
||||||
|
Loading…
Reference in New Issue
Block a user