Commit 13721ddd authored by Ralf Haferkamp's avatar Ralf Haferkamp Committed by Sandro Knauß

Recreate full URLs from partial URLs

Summary:
With https://phabricator.kde.org/D8843 applied it might happen that e.g.
the "remoteid" of an Event is not containing the hostname and schem
components of the Events URL. In order for deletes and updates to work
correctly we need reconstruct the full URL before sending any (non
multi-get) requests.

Related Bug: https://bugs.kde.org/show_bug.cgi?id=386985

Reviewers: #kde_pim, knauss

Reviewed By: #kde_pim, knauss

Subscribers: knauss, #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D8844

BUG: 386985
FIXED-IN: 5.7.0
parent 6d0d9892
......@@ -189,6 +189,12 @@ KDAV::DavUrl Settings::configuredDavUrl(KDAV::Protocol proto, const QString &sea
if (!finalUrl.isEmpty()) {
fullUrl = QUrl::fromUserInput(finalUrl);
if (finalUrl.startsWith(QLatin1Char('/')) ) {
QUrl searchQUrl(searchUrl);
fullUrl.setHost(searchQUrl.host());
fullUrl.setScheme(searchQUrl.scheme());
fullUrl.setPort(searchQUrl.port());
}
} else {
fullUrl = QUrl::fromUserInput(searchUrl);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment