[Libreoffice-commits] online.git: loolwsd/Storage.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Thu Mar 24 13:48:47 UTC 2016


 loolwsd/Storage.hpp |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit bea295bf0d6b98a807618ccd148980ace6e12c8a
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Thu Mar 24 09:43:46 2016 -0400

    loolwsd: wopi saving must post to /contents
    
    Change-Id: I749ffb8818ed0a0463c2c2da0f1c2730d06b6b1f
    Reviewed-on: https://gerrit.libreoffice.org/23493
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/Storage.hpp b/loolwsd/Storage.hpp
index dc0f2be..f33084b 100644
--- a/loolwsd/Storage.hpp
+++ b/loolwsd/Storage.hpp
@@ -246,7 +246,7 @@ public:
         // Add it here to get the payload instead of file info.
         Poco::URI uriObject(_uri);
         const auto url = uriObject.getPath() + "/contents?" + uriObject.getQuery();
-        Log::info("Requesting: " + url);
+        Log::debug("Wopi requesting: " + url);
 
         Poco::Net::HTTPClientSession session(uriObject.getHost(), uriObject.getPort());
         Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, url, Poco::Net::HTTPMessage::HTTP_1_1);
@@ -286,8 +286,11 @@ public:
         const auto size = getFileSize(_jailedFilePath);
 
         Poco::URI uriObject(_uri);
+        const auto url = uriObject.getPath() + "/contents?" + uriObject.getQuery();
+        Log::debug("Wopi posting: " + url);
+
         Poco::Net::HTTPClientSession session(uriObject.getHost(), uriObject.getPort());
-        Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST, uriObject.getPathAndQuery(), Poco::Net::HTTPMessage::HTTP_1_1);
+        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");
         request.setContentLength(size);


More information about the Libreoffice-commits mailing list