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.
This commit is contained in:
Vinnie Falco
2016-08-26 07:57:07 -04:00
parent e75fb7a4d4
commit 9c11d3fc33

View File

@@ -920,7 +920,7 @@ build_request(boost::string_ref const& host,
boost::string_ref const& resource, std::string& key)
{
http::request_v1<http::empty_body> req;
req.url = "/";
req.url = { resource.data(), resource.size() };
req.version = 11;
req.method = "GET";
req.headers.insert("Host", host);