loleaflet/js/global.js |    8 +++++---
 wsd/LOOLWSD.cpp        |    3 +--
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit a42a550afb2a3726fb2e097dfe5f078a1c08b715
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Wed Apr 22 21:07:10 2020 +0100
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Wed Apr 22 21:07:10 2020 +0100

    Proxy: detect isWaiting properly now we have requests serials.
    
    Change-Id: I76b2602192f1a49df73f4354bb26209fe2ed6d5d

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 49e88dbc0..de923daf2 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2912,8 +2912,7 @@ private:
 
         std::string fullURL = request.getURI();
         std::string ending = "/ws/wait";
-        bool isWaiting = (fullURL.size() > ending.size() &&
-                          std::equal(ending.rbegin(), ending.rend(), 
fullURL.rbegin()));
+        bool isWaiting = fullURL.find(ending) != std::string::npos;
         if (docBroker)
         {
             // need to move into the DocumentBroker context before doing 
session lookup / creation etc.
commit 58f64185362c590e16524b96af150359115f9995
Author:     Michael Meeks <michael.me...@collabora.com>
AuthorDate: Wed Apr 22 14:48:18 2020 +0100
Commit:     Michael Meeks <michael.me...@collabora.com>
CommitDate: Wed Apr 22 14:48:18 2020 +0100

    Tolerate missing WOPI parameters.
    
    Change-Id: Ic938b835aadeb299e06682b2f384db323eca0a91

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index a5b37d03b..1e09a86e0 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -491,9 +491,11 @@
                else if (global.accessHeader !== '') {
                        wopiParams = { 'access_header': global.accessHeader };
                }
-               docParams = Object.keys(wopiParams).map(function(key) {
-                       return encodeURIComponent(key) + '=' + 
encodeURIComponent(wopiParams[key]);
-               }).join('&');
+               if (wopiParams) {
+                       docParams = Object.keys(wopiParams).map(function(key) {
+                               return encodeURIComponent(key) + '=' + 
encodeURIComponent(wopiParams[key]);
+                       }).join('&');
+               }
        } else {
                global.docURL = filePath;
        }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to