Fix double slashes in websocket URL

This commit is contained in:
Marc Plano-Lesay 2016-07-07 15:22:15 +02:00
parent ec008a4995
commit 15edcc645c
1 changed files with 8 additions and 1 deletions

View File

@ -525,6 +525,7 @@ function get_appropriate_ws_url()
{
var pcol;
var u = document.URL;
var separator;
/*
/* We open the websocket encrypted if this page came on an
@ -542,7 +543,13 @@ function get_appropriate_ws_url()
u = u.split('#');
return pcol + u[0] + "/ws";
if (/\/$/.test(u[0])) {
separator = "";
} else {
separator = "/";
}
return pcol + u[0] + separator + "ws";
}
var updateVolumeIcon = function(volume)