[Libreoffice-commits] online.git: 2 commits - net/Socket.hpp wsd/DocumentBroker.cpp wsd/FileServer.cpp

Michael Meeks michael.meeks at collabora.com
Fri Mar 10 16:44:33 UTC 2017


 net/Socket.hpp         |    4 ++--
 wsd/DocumentBroker.cpp |    2 +-
 wsd/FileServer.cpp     |    2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1065441e7cda8c5edfbf1249f4092753669756ea
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Mar 10 16:42:59 2017 +0000

    Don't autosave if we're being stopped and happened to be overdue.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 37daacf..c5e5ece 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -415,7 +415,7 @@ public:
     /// Removes a socket from this poller.
     void releaseSocket(const std::shared_ptr<Socket>& socket)
     {
-        // assert(isCorrectThread());
+//        assert(isCorrectThread());
         if (socket)
         {
             std::lock_guard<std::mutex> lock(_mutex);
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index de6bac6..f50d9a3 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -250,7 +250,7 @@ void DocumentBroker::pollThread()
 
         _poll->poll(SocketPoll::DefaultPollTimeoutMs);
 
-        if (!std::getenv("LOOL_NO_AUTOSAVE") &&
+        if (!std::getenv("LOOL_NO_AUTOSAVE") && !_stop &&
             std::chrono::duration_cast<std::chrono::seconds>
             (std::chrono::steady_clock::now() - last30SecCheckTime).count() >= 30)
         {
commit 173ca5e3d695ebb6cd28234c7014ed62ac5c6e86
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Mar 10 16:42:48 2017 +0000

    Quote ETag.

diff --git a/net/Socket.hpp b/net/Socket.hpp
index c09ad53..37daacf 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -821,7 +821,7 @@ namespace HttpHelper
         response.set("User-Agent", HTTP_AGENT_STRING);
         // 60 * 60 * 24 * 128 (days) = 11059200
         response.set("Cache-Control", "max-age=11059200");
-        response.set("ETag", LOOLWSD_VERSION_HASH);
+        response.set("ETag", "\"" LOOLWSD_VERSION_HASH "\"");
 
         std::ostringstream oss;
         response.write(oss);
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 65b43d4..1de7813 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -300,6 +300,8 @@ void FileServerRequestHandler::preprocessFile(const HTTPRequest& request, Poco::
         << "Date: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
         << "Last-Modified: " << Poco::DateTimeFormatter::format(Poco::Timestamp(), Poco::DateTimeFormat::HTTP_FORMAT) << "\r\n"
         << "User-Agent: LOOLWSD WOPI Agent\r\n"
+        << "Cache-Control:max-age=11059200\r\n"
+        << "ETag: \"" LOOLWSD_VERSION_HASH "\"\r\n"
         << "Content-Length: " << preprocess.size() << "\r\n"
         << "Content-Type: " << mimeType << "\r\n"
         << "\r\n"


More information about the Libreoffice-commits mailing list