[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - 2 commits - net/loolnb.cpp net/Socket.hpp

Jan Holesovsky kendy at collabora.com
Wed Mar 1 12:53:08 UTC 2017


 net/Socket.hpp |    1 +
 net/loolnb.cpp |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit dbbc28646c130997c570025f6e44c6ed01823358
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Mar 1 13:41:04 2017 +0100

    nb: When we cannot send the file, we must respond with 404.
    
    Change-Id: I5f11e7de4b0bfb6e44929b8317e4788d2cc81610

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 5ba902e..fe4a721 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -586,6 +586,7 @@ namespace HttpHelper
         if (stat(path.c_str(), &st) != 0)
         {
             LOG_WRN("Failed to stat [" << path << "]. File will not be sent.");
+            throw Poco::FileNotFoundException("Failed to stat [" + path + "]. File will not be sent.");
             return;
         }
 
commit 826c4c234a42ad2aa61409787a83eed3ceef9477
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Feb 27 12:22:14 2017 +0100

    nb: Fix the check in loolnb.
    
    Change-Id: I54f23cb5fb76e4f9aab2743ddc2e6cda04a2656b

diff --git a/net/loolnb.cpp b/net/loolnb.cpp
index 9e6ac4d..f568821 100644
--- a/net/loolnb.cpp
+++ b/net/loolnb.cpp
@@ -196,7 +196,7 @@ public:
         };
 
         // Start the server.
-        if (args.back() == "ssl")
+        if (!args.empty() && args.back() == "ssl")
             server(addrSsl, poller, std::unique_ptr<SocketFactory>{new SslSocketFactory});
         else
 #endif


More information about the Libreoffice-commits mailing list