From c69aba9b44e9b465d6b085e5e7b76383eba29bd8 Mon Sep 17 00:00:00 2001 From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Sun, 2 Feb 2020 13:35:16 +0100 Subject: [PATCH] Fix wrong encoding when specifying extra header with if-match path Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- src/libsync/propagateuploadng.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;