diff options
author | Henry Castro <hcastro@collabora.com> | 2022-06-27 12:13:03 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-07-06 14:31:04 +0200 |
commit | 216a595061ec8efad3693dbe0be5b6200e04fb2f (patch) | |
tree | 7aee3704f5c0bfb6bf880f44cf033b3234f309e5 | |
parent | wsd: proxy: ensure to forward only static files (diff) | |
download | online-216a595061ec8efad3693dbe0be5b6200e04fb2f.tar.gz online-216a595061ec8efad3693dbe0be5b6200e04fb2f.zip |
wsd: proxy: fix length static string
Change-Id: I4508fc3e32f4d13a1a8ae88c3e4b9abc6d724ac4
Signed-off-by: Henry Castro <hcastro@collabora.com>
-rw-r--r-- | wsd/COOLWSD.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wsd/COOLWSD.cpp b/wsd/COOLWSD.cpp index b7721e46a6..ba1fb5333b 100644 --- a/wsd/COOLWSD.cpp +++ b/wsd/COOLWSD.cpp @@ -3429,10 +3429,11 @@ private: { // File server assert(socket && "Must have a valid socket"); - constexpr auto ProxyRemote = "/remote/static/"; + constexpr auto ProxyRemote = "/remote/"; constexpr auto ProxyRemoteLen = sizeof(ProxyRemote) - 1; + constexpr auto ProxyRemoteStatic = "/remote/static/"; const auto uri = requestDetails.getURI(); - const auto pos = uri.find(ProxyRemote); + const auto pos = uri.find(ProxyRemoteStatic); if (pos != std::string::npos) { ProxyRequestHandler::handleRequest(uri.substr(pos + ProxyRemoteLen), socket); |