|
@@ -57,6 +57,10 @@ void WebSocket::open(const string &url) {
|
|
|
if (state != State::Closed)
|
|
|
throw std::logic_error("WebSocket must be closed before opening");
|
|
|
|
|
|
+ if (config.proxyServer) {
|
|
|
+ PLOG_WARNING << "Proxy server support for WebSocket is not implemented";
|
|
|
+ }
|
|
|
+
|
|
|
// Modified regex from RFC 3986, see https://www.rfc-editor.org/rfc/rfc3986.html#appendix-B
|
|
|
static const char *rs =
|
|
|
R"(^(([^:.@/?#]+):)?(/{0,2}((([^:@]*)(:([^@]*))?)@)?(([^:/?#]*)(:([^/?#]*))?))?([^?#]*)(\?([^#]*))?(#(.*))?)";
|
|
@@ -76,6 +80,12 @@ void WebSocket::open(const string &url) {
|
|
|
|
|
|
mIsSecure = (scheme != "ws");
|
|
|
|
|
|
+ string username = m[6];
|
|
|
+ string password = m[8];
|
|
|
+ if (!username.empty() || !password.empty()) {
|
|
|
+ PLOG_WARNING << "HTTP authentication support for WebSocket is not implemented";
|
|
|
+ }
|
|
|
+
|
|
|
string host;
|
|
|
string hostname = m[10];
|
|
|
string service = m[12];
|