mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-07 12:15:49 +00:00
Changes for Beast version 59
This commit is contained in:
committed by
Miguel Portilla
parent
49bdf2e72d
commit
61316c7f95
@@ -248,9 +248,21 @@ public:
|
||||
bool
|
||||
isPeerUpgrade (http_request_type const& request);
|
||||
|
||||
template<class Body>
|
||||
static
|
||||
bool
|
||||
isPeerUpgrade (http_response_type const& response);
|
||||
isPeerUpgrade (beast::http::response<Body> const& response)
|
||||
{
|
||||
if (! is_upgrade(response))
|
||||
return false;
|
||||
if(response.result() != beast::http::status::switching_protocols)
|
||||
return false;
|
||||
auto const versions = parse_ProtocolVersions(
|
||||
response["Upgrade"]);
|
||||
if (versions.size() == 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
std::string
|
||||
|
||||
Reference in New Issue
Block a user