wsd/TraceFile.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 2cff31d0fd972fd90f8a23c2845ebcef339850a9 Author: Ashod Nakashian <[email protected]> Date: Fri Feb 10 01:06:17 2017 -0500 wsd: decode URI before calling URI::getPath as it fails Poco documentation for getPath says "Returns the decoded path part of the URI." Unfortunately, this isn't true for encoded URIs. It ends up returning the full URI (albeit decoded). So we decode the URI ourselves before calling getPath to ensure it will be able to parse it and return only the path, as promised. Change-Id: I23ed65f753f7e5db74ce7833b812f566b1964037 Reviewed-on: https://gerrit.libreoffice.org/34117 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/wsd/TraceFile.hpp b/wsd/TraceFile.hpp index 91f5a5e..23d4676 100644 --- a/wsd/TraceFile.hpp +++ b/wsd/TraceFile.hpp @@ -101,7 +101,9 @@ public: if (_takeSnapshot) { - const auto url = Poco::URI(uri).getPath(); + std::string decodedUri; + Poco::URI::decode(uri, decodedUri); + const auto url = Poco::URI(decodedUri).getPath(); const auto it = _urlToSnapshot.find(url); if (it != _urlToSnapshot.end()) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
