wsd/LOOLWSD.cpp | 6 +++--- wsd/RequestDetails.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit dd93a7eeb457774d89aab73507bfb4ef1dd86015 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Sun May 24 08:37:18 2020 -0400 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Tue Jun 2 17:26:59 2020 +0200 wsd: reuse more code and reduce inefficiencies Change-Id: I8cf4709822750bce92ceab3fbac50240035776fa Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95289 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index bb5aa4aa4..6802a1c28 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2357,10 +2357,10 @@ private: }); } else if (requestDetails.isGetOrHead("/")) - handleRootRequest(request, socket); + handleRootRequest(requestDetails, socket); else if (requestDetails.isGet("/favicon.ico")) - handleFaviconRequest(request, socket); + handleFaviconRequest(requestDetails, socket); else if (requestDetails.isGet("/hosting/discovery") || requestDetails.isGet("/hosting/discovery/")) @@ -3054,7 +3054,7 @@ private: LOG_INF("Starting GET request handler for session [" << _id << "] on url [" << LOOLWSD::anonymizeUrl(url) << "]."); // Indicate to the client that document broker is searching. - const std::string status("statusindicator: find"); + static const std::string status("statusindicator: find"); LOG_TRC("Sending to Client [" << status << "]."); ws->sendMessage(status); diff --git a/wsd/RequestDetails.hpp b/wsd/RequestDetails.hpp index 58e33d76d..89c36654e 100644 --- a/wsd/RequestDetails.hpp +++ b/wsd/RequestDetails.hpp @@ -66,7 +66,7 @@ public: } bool startsWith(const char *path) { - return !strncmp(_uriString.c_str(), path, strlen(path)); + return Util::startsWith(_uriString, path); } bool equals(size_t index, const char *string) const { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits