[Libreoffice-commits] online.git: wsd/FileServer.cpp
Michael Meeks
michael.meeks at collabora.com
Mon May 8 08:51:51 UTC 2017
wsd/FileServer.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 0088c148506a1a474ca64b9eb3facbebdb767757
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon May 8 09:51:06 2017 +0100
Allow env-var to affect serving from the FS only in debug mode.
Change-Id: I5e5d176295807af4de3e802ca02a0e1a1c17646e
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 3429ca10..ac4be4c6 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -207,6 +207,7 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
bool gzip = request.hasToken("Accept-Encoding", "gzip");
const std::string *content;
+#ifdef ENABLE_DEBUG
if (std::getenv("LOOL_SERVE_FROM_FS"))
{
// Useful to not serve from memory sometimes especially during loleaflet development
@@ -215,7 +216,8 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M
HttpHelper::sendFile(socket, filePath, mimeType, response, noCache);
return;
}
- else if (gzip)
+#endif
+ if (gzip)
{
response.set("Content-Encoding", "gzip");
content = getCompressedFile(relPath);
More information about the Libreoffice-commits
mailing list