Adapt to new URI format in the GET request

This commit is contained in:
Tor Lillqvist 2016-10-18 12:29:05 +03:00
parent 38ccbd0196
commit e87cf1e5d8

View file

@ -175,7 +175,9 @@ protected:
#else
HTTPClientSession cs(_uri.getHost(), _uri.getPort());
#endif
HTTPRequest request(HTTPRequest::HTTP_GET, std::string("lool/ws/") + args[0]);
std::string encodedUri;
URI::encode(args[0], ":/?", encodedUri);
HTTPRequest request(HTTPRequest::HTTP_GET, "/lool/" + encodedUri + "/ws");
HTTPResponse response;
WebSocket ws(cs, request, response);