[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 18 14:03:04 UTC 2020
wsd/LOOLWSD.cpp | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 40fd4696116d358749c7f92f6131572a78b5baed
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sat Feb 8 14:41:55 2020 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Tue Feb 18 15:02:46 2020 +0100
wsd: minor cleanup
Change-Id: I5b589d6cdb74f7f3a0c96ca2086500f6975a94b9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88369
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 518770979..6012202e3 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -615,8 +615,9 @@ public:
return;
// FIXME: needs wrapping - until then - keep in sync with ~ConvertToBroker
- Path tempPath = _convertTo? Path::forDirectory(Poco::TemporaryFile::tempName("/tmp/convert-to") + "/") :
- Path::forDirectory(Poco::TemporaryFile::tempName() + "/");
+ Path tempPath = Path::forDirectory(
+ Poco::TemporaryFile::tempName(_convertTo ? "/tmp/convert-to" : "") + '/');
+ LOG_TRC("Creating temporary convert-to path: " << tempPath.toString());
File(tempPath).createDirectories();
chmod(tempPath.toString().c_str(), S_IXUSR | S_IWUSR | S_IRUSR);
@@ -2100,7 +2101,6 @@ private:
/// Called after successful socket reads.
void handleIncomingMessage(SocketDisposition &disposition) override
{
- // LOG_TRC("***** ClientRequestDispatcher::handleIncomingMessage()");
std::shared_ptr<StreamSocket> socket = _socket.lock();
#if !MOBILEAPP
@@ -2126,6 +2126,7 @@ private:
if (!socket->parseHeader("Client", startmessage, request, &map))
return;
+ LOG_INF("Handling request: " << request.getURI());
try
{
// We may need to re-write the chunks moving the inBuffer.
@@ -2273,7 +2274,11 @@ private:
}
catch (const std::exception& exc)
{
+ LOG_INF("#" << socket->getFD() << " Exception while processing incoming request: [" <<
+ LOOLProtocol::getAbbreviatedMessage(socket->getInBuffer()) << "]: " << exc.what());
+
// Bad request.
+ // NOTE: Check _wsState to choose between HTTP response or WebSocket (app-level) error.
std::ostringstream oss;
oss << "HTTP/1.1 400\r\n"
<< "Date: " << Util::getHttpTimeNow() << "\r\n"
@@ -2282,10 +2287,6 @@ private:
<< "\r\n";
socket->send(oss.str());
socket->shutdown();
-
- // NOTE: Check _wsState to choose between HTTP response or WebSocket (app-level) error.
- LOG_INF("#" << socket->getFD() << " Exception while processing incoming request: [" <<
- LOOLProtocol::getAbbreviatedMessage(socket->getInBuffer()) << "]: " << exc.what());
return;
}
More information about the Libreoffice-commits
mailing list