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

New commits:
commit ad8b437360cd0b7a95fd587f7b17d4cf1f385ca1
Author: Jan Holesovsky <ke...@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/38797
    Reviewed-by: Marco Cecchetti <mrcek...@gmail.com>
    Tested-by: Marco Cecchetti <mrcek...@gmail.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index e137acca..bb4acf03 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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to