Browse Source

Fix bug 'Fragment identifiers are not allowed in WebSocket URLs'

fastled
Xose Pérez 7 years ago
parent
commit
f7617acaf2
3 changed files with 700 additions and 700 deletions
  1. BIN
      code/espurna/data/index.html.gz
  2. +696
    -696
      code/espurna/static/index.html.gz.h
  3. +4
    -4
      code/html/custom.js

BIN
code/espurna/data/index.html.gz View File


+ 696
- 696
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 4
- 4
code/html/custom.js View File

@ -688,16 +688,16 @@ function getJson(str) {
function connect(host) {
if (typeof host === 'undefined') {
host = window.location.href;
host = window.location.href.replace('#', '');
} else {
if (!host.startsWith("http")) {
host = "http://" + host + "/";
host = 'http://' + host + '/';
}
}
wshost = host.replace("http", "ws");
wshost = host.replace('http', 'ws') + 'ws';
if (websock) websock.close();
websock = new WebSocket(wshost + 'ws');
websock = new WebSocket(wshost);
websock.onopen = function(evt) {
console.log("Connected");
};


Loading…
Cancel
Save