Sent destination header per chunking v2 api
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 28 Jul 2023 07:38:07 +0000 (15:38 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 31 Aug 2023 13:25:00 +0000 (15:25 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/libsync/propagateuploadng.cpp

index 9757f32aeaec44e499b61ad2a12a41f7bf87aac9..70d9eb543ec8b3c676352638da2af076e9e1c24b 100644 (file)
@@ -362,6 +362,9 @@ void PropagateUploadFileNG::startNextChunk()
     QMap<QByteArray, QByteArray> headers;
     headers["OC-Chunk-Offset"] = QByteArray::number(_sent);
 
+    const auto destination = QDir::cleanPath(propagator()->account()->davUrl().path() + propagator()->fullRemotePath(_fileToUpload._file));
+    headers["Destination"] = QUrl::toPercentEncoding(destination);
+
     _sent += _currentChunkSize;
     const auto url = chunkUrl(_currentChunk);