[Libreoffice-commits] online.git: Branch 'distro/collabora/cloudsuite-rc1' - 3 commits - loleaflet/dist loolwsd/configure.ac loolwsd/Connect.cpp loolwsd/LOOLWSD.cpp loolwsd/loolwsd.spec.in loolwsd/Storage.cpp loolwsd/test

Andras Timar andras.timar at collabora.com
Fri Apr 8 10:54:27 UTC 2016


 loleaflet/dist/admin/admin.html          |   12 +++---
 loleaflet/dist/admin/adminAnalytics.html |   14 +++----
 loleaflet/dist/admin/adminSettings.html  |   12 +++---
 loleaflet/dist/loleaflet.html            |    3 -
 loolwsd/Connect.cpp                      |   10 +++++
 loolwsd/LOOLWSD.cpp                      |   14 +++++++
 loolwsd/Storage.cpp                      |   13 +++++++
 loolwsd/configure.ac                     |    7 +++
 loolwsd/loolwsd.spec.in                  |    6 ++-
 loolwsd/test/httpposttest.cpp            |    7 +++
 loolwsd/test/httpwstest.cpp              |   57 +++++++++++++++++++++++++++++++
 11 files changed, 132 insertions(+), 23 deletions(-)

New commits:
commit 5cfb45cf144c4706053e755870eb50c64f87b880
Author: Andras Timar <andras.timar at collabora.com>
Date:   Fri Apr 8 12:53:45 2016 +0200

    loleaflet: allow HTTP-only mode for testing/trial

diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html
index 7b35ea0..d03a6ef 100644
--- a/loleaflet/dist/admin/admin.html
+++ b/loleaflet/dist/admin/admin.html
@@ -37,7 +37,12 @@
     <script>vex.defaultOptions.className = 'vex-theme-plain';</script>
     <script>
 
-	host = 'wss://' + window.location.host + '/adminws/'
+        if (window.location.protocol == "https:") {
+	    host = 'wss://' + window.location.host + '/adminws/'
+        }
+        else {
+	    host = 'ws://' + window.location.host + '/adminws/'
+        }
 	new AdminSocketOverview(host);
 
     </script>
diff --git a/loleaflet/dist/admin/adminAnalytics.html b/loleaflet/dist/admin/adminAnalytics.html
index cb33ccf..daa135c 100644
--- a/loleaflet/dist/admin/adminAnalytics.html
+++ b/loleaflet/dist/admin/adminAnalytics.html
@@ -38,7 +38,12 @@
     <script src="admin-src.js"></script>
     <script>
 
-	host = 'wss://' + window.location.host + '/adminws/';
+        if (window.location.protocol == "https:") {
+           host = 'wss://' + window.location.host + '/adminws/'
+        }
+        else {
+           host = 'ws://' + window.location.host + '/adminws/'
+        }
 	new AdminSocketAnalytics(host);
 
     </script>
diff --git a/loleaflet/dist/admin/adminSettings.html b/loleaflet/dist/admin/adminSettings.html
index 9858656..307226c 100644
--- a/loleaflet/dist/admin/adminSettings.html
+++ b/loleaflet/dist/admin/adminSettings.html
@@ -37,7 +37,12 @@
     <script src="admin-src.js"></script>
     <script>
 
-	host = 'wss://' + window.location.host + '/adminws/';
+        if (window.location.protocol == "https:") {
+           host = 'wss://' + window.location.host + '/adminws/'
+        }
+        else {
+           host = 'ws://' + window.location.host + '/adminws/'
+        }
 	new AdminSocketSettings(host);
 
     </script>
diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html
index 656fd0d..c26acec 100644
--- a/loleaflet/dist/loleaflet.html
+++ b/loleaflet/dist/loleaflet.html
@@ -283,9 +283,6 @@
     if (host === '') {
 	vex.dialog.alert('The host URL is empty, usage: host=wss://localhost:9980');
     }
-    if (host.startsWith('ws:')) {
-        vex.dialog.alert('Please use wss: instead of ws: in the host URL, usage: host=wss://localhost:9980');
-    }
     var docURL = wopiSrc !== '' ? wopiSrc : filePath;
 
     document.title = title;
commit a71ddf1c5bbd941e0cb3b06228a14b77cee506d2
Author: Andras Timar <andras.timar at collabora.com>
Date:   Fri Apr 8 11:24:52 2016 +0200

    loolwsd: --disable-ssl option

diff --git a/loolwsd/Connect.cpp b/loolwsd/Connect.cpp
index e5f1c51..b48d2ba 100644
--- a/loolwsd/Connect.cpp
+++ b/loolwsd/Connect.cpp
@@ -14,6 +14,7 @@
 
 #include <Poco/Net/AcceptCertificateHandler.h>
 #include <Poco/Net/Context.h>
+#include <Poco/Net/HTTPClientSession.h>
 #include <Poco/Net/HTTPSClientSession.h>
 #include <Poco/Net/HTTPRequest.h>
 #include <Poco/Net/HTTPResponse.h>
@@ -43,6 +44,7 @@ using namespace LOOLProtocol;
 
 using Poco::Net::AcceptCertificateHandler;
 using Poco::Net::Context;
+using Poco::Net::HTTPClientSession;
 using Poco::Net::HTTPSClientSession;
 using Poco::Net::HTTPRequest;
 using Poco::Net::HTTPResponse;
@@ -118,7 +120,11 @@ class Connect: public Poco::Util::Application
 {
 public:
     Connect() :
+#ifdef ENABLE_SSL
         _uri("https://127.0.0.1:" + std::to_string(DEFAULT_CLIENT_PORT_NUMBER) + "/ws")
+#else
+        _uri("http://127.0.0.1:" + std::to_string(DEFAULT_CLIENT_PORT_NUMBER) + "/ws")
+#endif
     {
     }
 
@@ -138,6 +144,7 @@ protected:
         if (args.size() > 1)
             _uri = URI(args[1]);
 
+#ifdef ENABLE_SSL
         Poco::Net::initializeSSL();
 
         SharedPtr<InvalidCertificateHandler> invalidCertHandler = new AcceptCertificateHandler(false);
@@ -146,6 +153,9 @@ protected:
         SSLManager::instance().initializeClient(0, invalidCertHandler, sslContext);
 
         HTTPSClientSession cs(_uri.getHost(), _uri.getPort());
+#else
+        HTTPClientSession cs(_uri.getHost(), _uri.getPort());
+#endif
         HTTPRequest request(HTTPRequest::HTTP_GET, args[0]);
         HTTPResponse response;
         WebSocket ws(cs, request, response);
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 24c9642..07d79f8 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -535,7 +535,11 @@ private:
         const std::string mediaType = "text/xml";
         const std::string action = "action";
         const std::string urlsrc = "urlsrc";
+#ifdef ENABLE_SSL
         const std::string uriValue = "https://" + uri.getHost() + ":" + std::to_string(uri.getPort()) + "/loleaflet/dist/loleaflet.html?";
+#else
+        const std::string uriValue = "http://" + uri.getHost() + ":" + std::to_string(uri.getPort()) + "/loleaflet/dist/loleaflet.html?";
+#endif
 
         InputSource inputSrc(discoveryPath);
         AutoPtr<Poco::XML::Document> docXML = parser.parse(&inputSrc);
@@ -912,6 +916,7 @@ void LOOLWSD::initialize(Application& self)
     ServerApplication::initialize(self);
 }
 
+#ifdef ENABLE_SSL
 void LOOLWSD::initializeSSL()
 {
     auto& conf = config();
@@ -967,6 +972,7 @@ void LOOLWSD::initializeSSL()
     Poco::Net::Context::Ptr sslClientContext = new Poco::Net::Context(Poco::Net::Context::CLIENT_USE, sslClientParams);
     Poco::Net::SSLManager::instance().initializeClient(consoleClientHandler, invalidClientCertHandler, sslClientContext);
 }
+#endif
 
 void LOOLWSD::uninitialize()
 {
@@ -1110,7 +1116,9 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
         return Application::EXIT_USAGE;
     }
 
+#ifdef ENABLE_SSL
     initializeSSL();
+#endif
 
     char *locale = setlocale(LC_ALL, nullptr);
     if (locale == nullptr || std::strcmp(locale, "C") == 0)
@@ -1225,7 +1233,11 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
     params2->setMaxThreads(MAX_SESSIONS);
 
     // Start a server listening on the port for clients
+#ifdef ENABLE_SSL
     SecureServerSocket svs(ClientPortNumber);
+#else
+    ServerSocket svs(ClientPortNumber);
+#endif
     ThreadPool threadPool(NumPreSpawnedChildren*6, MAX_SESSIONS * 2);
     HTTPServer srv(new ClientRequestHandlerFactory(admin, fileServer), threadPool, svs, params1);
 
@@ -1406,8 +1418,10 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
         Util::removeFile(path, true);
     }
 
+#ifdef ENABLE_SSL
     Poco::Net::uninitializeSSL();
     Poco::Crypto::uninitializeCrypto();
+#endif
 
     Log::info("Process [loolwsd] finished.");
     return Application::EXIT_OK;
diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp
index f649a79..5e71cb4 100644
--- a/loolwsd/Storage.cpp
+++ b/loolwsd/Storage.cpp
@@ -13,6 +13,7 @@
 
 #include <Poco/Net/HTTPResponse.h>
 #include <Poco/Net/HTTPRequest.h>
+#include <Poco/Net/HTTPClientSession.h>
 #include <Poco/Net/HTTPSClientSession.h>
 #include <Poco/Net/SSLManager.h>
 #include <Poco/StreamCopier.h>
@@ -128,7 +129,11 @@ StorageBase::FileInfo WopiStorage::getFileInfo(const Poco::URI& uri)
     Log::debug("Getting info for wopi uri [" + uri.toString() + "].");
 
     Poco::URI uriObject(uri);
+#ifdef ENABLE_SSL
     Poco::Net::HTTPSClientSession session(uriObject.getHost(), uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
+#else
+    Poco::Net::HTTPClientSession session(uriObject.getHost(), uriObject.getPort());
+#endif
     Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, uriObject.getPathAndQuery(), Poco::Net::HTTPMessage::HTTP_1_1);
     request.set("User-Agent", "LOOLWSD WOPI Agent");
     session.sendRequest(request);
@@ -184,7 +189,11 @@ std::string WopiStorage::loadStorageFileToLocal()
     const auto url = uriObject.getPath() + "/contents?" + uriObject.getQuery();
     Log::debug("Wopi requesting: " + url);
 
+#ifdef ENABLE_SSL
     Poco::Net::HTTPSClientSession session(uriObject.getHost(), uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
+#else
+    Poco::Net::HTTPClientSession session(uriObject.getHost(), uriObject.getPort());
+#endif
     Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, url, Poco::Net::HTTPMessage::HTTP_1_1);
     request.set("User-Agent", "LOOLWSD WOPI Agent");
     session.sendRequest(request);
@@ -225,7 +234,11 @@ bool WopiStorage::saveLocalFileToStorage()
     const auto url = uriObject.getPath() + "/contents?" + uriObject.getQuery();
     Log::debug("Wopi posting: " + url);
 
+#ifdef ENABLE_SSL
     Poco::Net::HTTPSClientSession session(uriObject.getHost(), uriObject.getPort(), Poco::Net::SSLManager::instance().defaultClientContext());
+#else
+    Poco::Net::HTTPClientSession session(uriObject.getHost(), uriObject.getPort());
+#endif
     Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, url, Poco::Net::HTTPMessage::HTTP_1_1);
     request.set("X-WOPIOverride", "PUT");
     request.setContentType("application/octet-stream");
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index 2108304..ca83f4d 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -63,6 +63,10 @@ AC_ARG_ENABLE([tests],
             AS_HELP_STRING([--disable-tests],
                            [Build and run unit tests]))
 
+AC_ARG_ENABLE([ssl],
+            AS_HELP_STRING([--disable-ssl],
+                           [Compile without SSL support]))
+
 # Handle options
 AS_IF([test "$enable_debug" = yes -a -n "$with_poco_libs"],
       [POCO_DEBUG_SUFFIX=d],
@@ -119,6 +123,9 @@ AS_IF([test `uname -s` = Linux],
 AS_IF([test "$enable_tests" != "no"],
       [PKG_CHECK_MODULES([CPPUNIT], [cppunit])])
 
+AS_IF([test "$enable_ssl" != "no"],
+      [AC_DEFINE([ENABLE_SSL],[],[Enable SSL])])
+
 LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
 
 AC_CHECK_HEADERS([LibreOfficeKit/LibreOfficeKit.h],
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 324cfb5..997af25 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -37,7 +37,11 @@ Requires:       libcap libcap-progs libpng libPocoFoundation42 >= 1.7.1 libPocoN
 %setup -q
 
 %build
-%configure --with-lokit-path=bundled/include
+%configure \
+	--with-lokit-path=bundled/include \
+%if %{ssl_support} == "NO"
+	--disable-ssl
+%endif
 
 env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
 
diff --git a/loolwsd/test/httpposttest.cpp b/loolwsd/test/httpposttest.cpp
index aafdbd1..57548f6 100644
--- a/loolwsd/test/httpposttest.cpp
+++ b/loolwsd/test/httpposttest.cpp
@@ -34,6 +34,7 @@ class HTTPPostTest : public CPPUNIT_NS::TestFixture
 
     void testConvertTo();
 
+#ifdef ENABLE_SSL
 public:
     HTTPPostTest()
     {
@@ -49,14 +50,20 @@ public:
     {
         Poco::Net::uninitializeSSL();
     }
+#endif
 };
 
 void HTTPPostTest::testConvertTo()
 {
     const auto srcPath = Util::getTempFilePath(TDOC, "hello.odt");
 
+#ifdef ENABLE_SSL
     Poco::URI uri("https://127.0.0.1:" + std::to_string(ClientPortNumber));
     Poco::Net::HTTPSClientSession session(uri.getHost(), uri.getPort());
+#else
+    Poco::URI uri("http://127.0.0.1:" + std::to_string(ClientPortNumber));
+    Poco::Net::HTTPClientSession session(uri.getHost(), uri.getPort());
+#endif
 
     Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, "/convert-to");
     Poco::Net::HTMLForm form;
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index d01aa4d..1965909 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -9,6 +9,7 @@
 
 #include <Poco/Net/AcceptCertificateHandler.h>
 #include <Poco/Net/HTTPRequest.h>
+#include <Poco/Net/HTTPClientSession.h>
 #include <Poco/Net/HTTPSClientSession.h>
 #include <Poco/Net/HTTPResponse.h>
 #include <Poco/Net/InvalidCertificateHandler.h>
@@ -79,20 +80,28 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
                             const bool isLine);
 public:
     HTTPWSTest()
+#ifdef ENABLE_SSL
         : _uri("https://127.0.0.1:" + std::to_string(ClientPortNumber))
+#else
+        : _uri("http://127.0.0.1:" + std::to_string(ClientPortNumber))
+#endif
     {
+#ifdef ENABLE_SSL
         Poco::Net::initializeSSL();
         // Just accept the certificate anyway for testing purposes
         Poco::SharedPtr<Poco::Net::InvalidCertificateHandler> invalidCertHandler = new Poco::Net::AcceptCertificateHandler(false);
         Poco::Net::Context::Params sslParams;
         Poco::Net::Context::Ptr sslContext = new Poco::Net::Context(Poco::Net::Context::CLIENT_USE, sslParams);
         Poco::Net::SSLManager::instance().initializeClient(0, invalidCertHandler, sslContext);
+#endif
     }
 
+#ifdef ENABLE_SSL
     ~HTTPWSTest()
     {
         Poco::Net::uninitializeSSL();
     }
+#endif
 
     void setUp()
     {
@@ -118,7 +127,11 @@ void HTTPWSTest::testLoad()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -168,7 +181,11 @@ void HTTPWSTest::testBadLoad()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         // Before loading request status.
@@ -218,7 +235,11 @@ void HTTPWSTest::testSaveOnDisconnect()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -243,7 +264,11 @@ void HTTPWSTest::testSaveOnDisconnect()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -293,7 +318,11 @@ void HTTPWSTest::testExcelLoad()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -342,7 +371,11 @@ void HTTPWSTest::testPaste()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -398,7 +431,11 @@ void HTTPWSTest::testLargePaste()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
@@ -452,7 +489,11 @@ void HTTPWSTest::testRenderingOptions()
         const std::string options = "{\"rendering\":{\".uno:HideWhitespace\":{\"type\":\"boolean\",\"value\":\"true\"}}}";
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL + " options=" + options);
@@ -506,7 +547,11 @@ void HTTPWSTest::testPasswordProtectedDocumentWithoutPassword()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         // Send a load request without password first
@@ -543,7 +588,11 @@ void HTTPWSTest::testPasswordProtectedDocumentWithWrongPassword()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         // Send a load request with incorrect password
@@ -580,7 +629,11 @@ void HTTPWSTest::testPasswordProtectedDocumentWithCorrectPassword()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         // Send a load request with correct password
@@ -610,7 +663,11 @@ void HTTPWSTest::testImpressPartCountChanged()
         const std::string documentURL = "file://" + Poco::Path(documentPath).makeAbsolute().toString();
 
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, documentURL);
+#ifdef ENABLE_SSL
         Poco::Net::HTTPSClientSession session(_uri.getHost(), _uri.getPort());
+#else
+        Poco::Net::HTTPClientSession session(_uri.getHost(), _uri.getPort());
+#endif
         Poco::Net::WebSocket socket(session, request, _response);
 
         sendTextFrame(socket, "load url=" + documentURL);
commit 12e6c9a03131f3f96fd0d45f6a3ff32012719b28
Author: Pranav Kant <pranavk at collabora.com>
Date:   Wed Apr 6 10:14:26 2016 +0530

    bccu#1660: Remove unused/superfluous links
    
    Change-Id: Ib5e78586a1c33ca16bd4848e0912313434b7db54

diff --git a/loleaflet/dist/admin/admin.html b/loleaflet/dist/admin/admin.html
index 5663b80..7b35ea0 100644
--- a/loleaflet/dist/admin/admin.html
+++ b/loleaflet/dist/admin/admin.html
@@ -55,13 +55,8 @@
         </div>
         <div id="navbar" class="navbar-collapse collapse">
           <ul class="nav navbar-nav navbar-right">
-            <li><a href="admin.html">Dashboard</a></li>
             <li><a href="adminSettings.html">Settings</a></li>
-            <li><a href="#">Help</a></li>
           </ul>
-          <form class="navbar-form navbar-right">
-            <input type="text" class="form-control" placeholder="Search...">
-          </form>
         </div>
       </div>
     </nav>
diff --git a/loleaflet/dist/admin/adminAnalytics.html b/loleaflet/dist/admin/adminAnalytics.html
index 4a4c92a..cb33ccf 100644
--- a/loleaflet/dist/admin/adminAnalytics.html
+++ b/loleaflet/dist/admin/adminAnalytics.html
@@ -56,13 +56,8 @@
         </div>
         <div id="navbar" class="navbar-collapse collapse">
           <ul class="nav navbar-nav navbar-right">
-	    <li><a href="admin.html?host=wss://localhost:9989">Dashboard</a></li>
-            <li><a href="adminSettings.html?host=wss://localhost:9989">Settings</a></li>
-            <li><a href="#">Help</a></li>
+            <li><a href="adminSettings.html">Settings</a></li>
           </ul>
-          <form class="navbar-form navbar-right">
-            <input type="text" class="form-control" placeholder="Search...">
-          </form>
         </div>
       </div>
     </nav>
diff --git a/loleaflet/dist/admin/adminSettings.html b/loleaflet/dist/admin/adminSettings.html
index c41fd5b..9858656 100644
--- a/loleaflet/dist/admin/adminSettings.html
+++ b/loleaflet/dist/admin/adminSettings.html
@@ -55,13 +55,8 @@
         </div>
         <div id="navbar" class="navbar-collapse collapse">
           <ul class="nav navbar-nav navbar-right">
-            <li><a href="admin.html">Dashboard</a></li>
             <li><a href="adminSettings.html">Settings</a></li>
-            <li><a href="#">Help</a></li>
           </ul>
-          <form class="navbar-form navbar-right">
-            <input type="text" class="form-control" placeholder="Search...">
-          </form>
         </div>
       </div>
     </nav>


More information about the Libreoffice-commits mailing list