From 9c11d3fc335b510e4381cc03ea2483c1d86cdc55 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 26 Aug 2016 07:57:07 -0400 Subject: [PATCH] Set URI in generated WebSocket Upgrade requests (fix #64): The 'resource' parameter in the call to stream::handshake is used when building the HTTP request to perform the upgrade. --- include/beast/websocket/impl/stream.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/beast/websocket/impl/stream.ipp b/include/beast/websocket/impl/stream.ipp index 874081df..4c69a032 100644 --- a/include/beast/websocket/impl/stream.ipp +++ b/include/beast/websocket/impl/stream.ipp @@ -920,7 +920,7 @@ build_request(boost::string_ref const& host, boost::string_ref const& resource, std::string& key) { http::request_v1 req; - req.url = "/"; + req.url = { resource.data(), resource.size() }; req.version = 11; req.method = "GET"; req.headers.insert("Host", host);