D24316: Consider the usage of WebDAV methods sufficient for assuming WebDAV

Volker Krause noreply at phabricator.kde.org
Wed Oct 23 07:52:00 BST 2019


vkrause added a comment.


  Overall we probably have two options, revert this change (and the corresponding change in KDAV) and defer it to KF6, or harden this code further against duplicates in custom headers. The below might work for Content-Type (no way to test here atm), a similar fix for Depth would require a bit more code reshuffling I think.
  
    diff --git a/src/ioslaves/http/http.cpp b/src/ioslaves/http/http.cpp
    index e3bad6cc..88c13999 100644
    --- a/src/ioslaves/http/http.cpp
    +++ b/src/ioslaves/http/http.cpp
    @@ -2599,7 +2599,7 @@ bool HTTPProtocol::sendQuery()
                 davHeader += metaData(QStringLiteral("davHeader"));
     
                 // Set content type of webdav data
    -            if (hasDavData) {
    +            if (hasDavData && !header.contains(QLatin1String("Content-Type: "))) {
                     davHeader += QStringLiteral("Content-Type: text/xml; charset=utf-8\r\n");
                 }

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D24316

To: vkrause, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191023/96fe4ac2/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list