From 13205bee5ffe2b5418c51831311f902f175b7987 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 15 Jun 2014 23:18:12 +0200 Subject: [PATCH] js: Connect to /mopidy/ws without trailing slash This is the recommended URL since the switch to Tornado as web server. --- js/src/mopidy.js | 2 +- js/test/mopidy-test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/mopidy.js b/js/src/mopidy.js index ff0a64ee..8586d231 100644 --- a/js/src/mopidy.js +++ b/js/src/mopidy.js @@ -44,7 +44,7 @@ Mopidy.prototype._configure = function (settings) { var currentHost = (typeof document !== "undefined" && document.location.host) || "localhost"; settings.webSocketUrl = settings.webSocketUrl || - "ws://" + currentHost + "/mopidy/ws/"; + "ws://" + currentHost + "/mopidy/ws"; if (settings.autoConnect !== false) { settings.autoConnect = true; diff --git a/js/test/mopidy-test.js b/js/test/mopidy-test.js index 0dc95a45..4485bc32 100644 --- a/js/test/mopidy-test.js +++ b/js/test/mopidy-test.js @@ -48,7 +48,7 @@ buster.testCase("Mopidy", { document.location.host || "localhost"; assert.calledOnceWith(this.webSocketConstructorStub, - "ws://" + currentHost + "/mopidy/ws/"); + "ws://" + currentHost + "/mopidy/ws"); }, "does not connect when autoConnect is false": function () { @@ -84,7 +84,7 @@ buster.testCase("Mopidy", { document.location.host || "localhost"; assert.calledOnceWith(this.webSocketConstructorStub, - "ws://" + currentHost + "/mopidy/ws/"); + "ws://" + currentHost + "/mopidy/ws"); }, "does nothing when the WebSocket is open": function () {