[Libreoffice-commits] online.git: loleaflet/src

Jan Holesovsky kendy at collabora.com
Wed Jun 14 16:30:15 UTC 2017


 loleaflet/src/core/Socket.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3a1aa4cd9c88215f4702536618b1888f1c82c840
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Jun 14 18:27:45 2017 +0200

    loleaflet: Shorten the docuri in the websocket request.
    
    Change-Id: Ia0eed46930930e013a5eeee1c25161a2745f3188
    Reviewed-on: https://gerrit.libreoffice.org/38798
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 444abe62..8e68ec40 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -19,10 +19,12 @@ L.Socket = L.Class.extend({
 		console.debug('socket.initialize:');
 		this._map = map;
 		try {
+			var paramsForURI = '';
 			if (map.options.permission) {
 				map.options.docParams['permission'] = map.options.permission;
+				paramsForURI = '?' + 'permission=' + map.options.permission;
 			}
-			this.socket = new WebSocket(map.options.server + '/lool/' + encodeURIComponent(map.options.doc + '?' + $.param(map.options.docParams)) + '/ws');
+			this.socket = new WebSocket(map.options.server + '/lool/' + encodeURIComponent(map.options.doc + paramsForURI) + '/ws');
 			this.socket.onerror = L.bind(this._onSocketError, this);
 			this.socket.onclose = L.bind(this._onSocketClose, this);
 			this.socket.onopen = L.bind(this._onSocketOpen, this);


More information about the Libreoffice-commits mailing list