Merge pull request #1 from helloIAmPau/master
Websocket server URL with no path in the end are not parsed! (but now they are)
This commit is contained in:
@@ -265,6 +265,8 @@ WebSocket::pointer WebSocket::from_url(std::string url) {
|
||||
else if (sscanf(url.c_str(), "ws://%[^/]/%s", host, path) == 2) {
|
||||
port = 80;
|
||||
}
|
||||
else if (sscanf(url.c_str(), "ws://%[^:]:%d", host, &port) == 2) {
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "ERROR: Could not parse WebSocket url: %s\n", url.c_str());
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user