[frameworks/kdav] src/common: davitemmodifyjob: Fix redirection

Kevin Ottens <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 3690309ea8657f958aedf491a4ae20a39b82770c by Kevin Ottens, on behalf of Carl Schwan.
Committed on 28/07/2026 at 19:47.
Pushed by ervin into branch 'master'.

davitemmodifyjob: Fix redirection

QNetworkReply::header(QNetworkRequest::LocationHeader) returns an empty
string while QNetworkReply::rawHeader("location") does not.

M  +1    -1    src/common/davitemmodifyjob.cpp

https://invent.kde.org/frameworks/kdav/-/commit/3690309ea8657f958aedf491a4ae20a39b82770c

diff --git a/src/common/davitemmodifyjob.cpp b/src/common/davitemmodifyjob.cpp
index 3965847..bcdc21d 100644
--- a/src/common/davitemmodifyjob.cpp
+++ b/src/common/davitemmodifyjob.cpp
@@ -106,7 +106,7 @@ void DavItemModifyJobPrivate::davJobFinished(QNetworkReply *reply)
     }
 
     // The 'Location:' HTTP header is used to indicate the new URL
-    const QString location = reply->header(QNetworkRequest::LocationHeader).toString();
+    const QString location = QString::fromUtf8(reply->rawHeader("location"));
 
     QUrl url;
     if (location.isEmpty()) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.