[Libreoffice-commits] online.git: test/integration-http-server.cpp wsd/LOOLWSD.cpp

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 19 13:51:39 UTC 2019


 test/integration-http-server.cpp |    8 ++++++++
 wsd/LOOLWSD.cpp                  |    2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 7349cc1f32b3fbf3542c7370be31b2da174f2bd4
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Tue Nov 19 14:27:41 2019 +0530
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Nov 19 14:51:17 2019 +0100

    additional URI support added for some broken Implementation
    
    "/hosting/discovery/"  added in addition to "/hosting/discovery"
    
    Change-Id: I33f7fda9981d8d4e95ca5d69d3d6b3da1e4b0eeb
    Reviewed-on: https://gerrit.libreoffice.org/83169
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp
index cf4efcdb4..c19c57904 100644
--- a/test/integration-http-server.cpp
+++ b/test/integration-http-server.cpp
@@ -128,6 +128,14 @@ void HTTPServerTest::testDiscovery()
     session->receiveResponse(response);
     CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, response.getStatus());
     CPPUNIT_ASSERT_EQUAL(std::string("text/xml"), response.getContentType());
+
+    Poco::Net::HTTPRequest request2(Poco::Net::HTTPRequest::HTTP_GET, "/hosting/discovery/");
+    session->sendRequest(request2);
+
+    Poco::Net::HTTPResponse response2;
+    session->receiveResponse(response2);
+    CPPUNIT_ASSERT_EQUAL(Poco::Net::HTTPResponse::HTTP_OK, response2.getStatus());
+    CPPUNIT_ASSERT_EQUAL(std::string("text/xml"), response2.getContentType());
 }
 
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 5a0bc7f60..410769ab6 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2175,7 +2175,7 @@ private:
             {
                 handleFaviconRequest(request);
             }
-            else if (request.getMethod() == HTTPRequest::HTTP_GET && request.getURI() == "/hosting/discovery")
+            else if (request.getMethod() == HTTPRequest::HTTP_GET && (request.getURI() == "/hosting/discovery" || request.getURI() == "/hosting/discovery/"))
             {
                 handleWopiDiscoveryRequest(request);
             }


More information about the Libreoffice-commits mailing list