mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 18:15:50 +00:00
Update to use latest beast
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <ripple/basics/Resolver.h>
|
||||
#include <ripple/basics/chrono.h>
|
||||
#include <ripple/basics/UnorderedContainers.h>
|
||||
#include <ripple/overlay/impl/TMHello.h>
|
||||
#include <ripple/peerfinder/PeerfinderManager.h>
|
||||
#include <ripple/resource/ResourceManager.h>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
@@ -264,6 +265,32 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class Fields>
|
||||
static
|
||||
bool
|
||||
is_upgrade(beast::http::header<true, Fields> const& req)
|
||||
{
|
||||
if(req.version < 11)
|
||||
return false;
|
||||
if(req.method() != beast::http::verb::get)
|
||||
return false;
|
||||
if(! beast::http::token_list{req["Connection"]}.exists("upgrade"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
template<class Fields>
|
||||
static
|
||||
bool
|
||||
is_upgrade(beast::http::header<false, Fields> const& req)
|
||||
{
|
||||
if(req.version < 11)
|
||||
return false;
|
||||
if(! beast::http::token_list{req["Connection"]}.exists("upgrade"))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
std::string
|
||||
makePrefix (std::uint32_t id);
|
||||
|
||||
Reference in New Issue
Block a user