diff --git a/modules/beast_asio/handshake/beast_HandshakeDetectLogicPROXY.h b/modules/beast_asio/handshake/beast_HandshakeDetectLogicPROXY.h index 4b65e9bb9..24a84e2e1 100644 --- a/modules/beast_asio/handshake/beast_HandshakeDetectLogicPROXY.h +++ b/modules/beast_asio/handshake/beast_HandshakeDetectLogicPROXY.h @@ -95,7 +95,7 @@ public: { using namespace InputParser; - if (! match (in, "PROXY "), state) + if (! match (in, "PROXY ", state)) return; if (match (in, "TCP4 ")) diff --git a/modules/beast_asio/handshake/beast_HandshakeDetectStream.h b/modules/beast_asio/handshake/beast_HandshakeDetectStream.h index 34c1e3aca..d5c710709 100644 --- a/modules/beast_asio/handshake/beast_HandshakeDetectStream.h +++ b/modules/beast_asio/handshake/beast_HandshakeDetectStream.h @@ -79,18 +79,20 @@ class HandshakeDetectStreamType , public boost::asio::socket_base { private: + typedef boost::system::error_code error_code; + typedef HandshakeDetectStreamType this_type; typedef boost::asio::streambuf buffer_type; typedef typename boost::remove_reference ::type stream_type; public: - typedef typename HandshakeDetectStream CallbackType; + typedef typename HandshakeDetectStream ::Callback CallbackType; /** This takes ownership of the callback. The callback must be allocated with operator new. */ template - HandshakeDetectStreamType (Callback* callback, Arg& arg) + HandshakeDetectStreamType (CallbackType* callback, Arg& arg) : m_callback (callback) , m_next_layer (arg) , m_stream (m_next_layer) @@ -139,7 +141,7 @@ public: } template - BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler, void (error_code)) + BEAST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler, void (error_code)) async_handshake (handshake_type type, BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler) { #if BEAST_ASIO_HAS_FUTURE_RETURNS @@ -167,7 +169,7 @@ public: } template - BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler, void (error_code, std::size_t)) + BEAST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler, void (error_code, std::size_t)) async_handshake(handshake_type type, const ConstBufferSequence& buffers, BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler) { @@ -316,7 +318,7 @@ public: } private: - ScopedPointer ::Callback> m_callback; + ScopedPointer m_callback; Stream m_next_layer; buffer_type m_buffer; boost::asio::buffered_read_stream m_stream; diff --git a/modules/beast_asio/sockets/beast_SocketWrapper.h b/modules/beast_asio/sockets/beast_SocketWrapper.h index 77c8aeaeb..47cfa48af 100644 --- a/modules/beast_asio/sockets/beast_SocketWrapper.h +++ b/modules/beast_asio/sockets/beast_SocketWrapper.h @@ -476,7 +476,7 @@ public: } template - BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void (error_code, std::size_t)) + BEAST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void (error_code, std::size_t)) async_read_some (MutableBufferSequence const& buffers, BOOST_ASIO_MOVE_ARG(ReadHandler) handler, boost::true_type) {