2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 #ifndef BOOST_BEAST_WEBSOCKET_IMPL_RFC6455_IPP
11 #define BOOST_BEAST_WEBSOCKET_IMPL_RFC6455_IPP
13 #include <boost/beast/http/fields.hpp>
14 #include <boost/beast/http/rfc7230.hpp>
20 template<class Allocator>
22 is_upgrade(http::header<true,
23 http::basic_fields<Allocator>> const& req)
25 if(req.version() < 11)
27 if(req.method() != http::verb::get)
29 if(! http::token_list{req[http::field::connection]}.exists("upgrade"))
31 if(! http::token_list{req[http::field::upgrade]}.exists("websocket"))