From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Sun, 2 Feb 2020 12:35:16 +0000 (+0100) Subject: Fix wrong encoding when specifying extra header with if-match path X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~363^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c69aba9b44e9b465d6b085e5e7b76383eba29bd8;p=nextcloud-desktop.git Fix wrong encoding when specifying extra header with if-match path Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- diff --git a/src/libsync/propagateuploadng.cpp b/src/libsync/propagateuploadng.cpp index 7dae923cb..bb93713ce 100644 --- a/src/libsync/propagateuploadng.cpp +++ b/src/libsync/propagateuploadng.cpp @@ -286,7 +286,7 @@ void PropagateUploadFileNG::startNextChunk() // "If-Match applies to the source, but we are interested in comparing the etag of the destination auto ifMatch = headers.take("If-Match"); if (!ifMatch.isEmpty()) { - headers["If"] = "<" + destination.toUtf8() + "> ([" + ifMatch + "])"; + headers["If"] = "<" + QUrl::toPercentEncoding(destination, "/") + "> ([" + ifMatch + "])"; } if (!_transmissionChecksumHeader.isEmpty()) { qCInfo(lcPropagateUpload) << destination << _transmissionChecksumHeader;