From: Olivier Goffart Date: Thu, 20 Oct 2016 09:16:06 +0000 (+0200) Subject: ChunkingNG: Use the 'If' header X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1014^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=273590fdfcbc900b3a788ad81faa9e2f033b2d62;p=nextcloud-desktop.git ChunkingNG: Use the 'If' header As discussed in https://github.com/owncloud/core/pull/26368 --- diff --git a/src/libsync/propagateuploadng.cpp b/src/libsync/propagateuploadng.cpp index 5e43be633..7b632233d 100644 --- a/src/libsync/propagateuploadng.cpp +++ b/src/libsync/propagateuploadng.cpp @@ -210,11 +210,10 @@ void PropagateUploadFileNG::startNextChunk() + _propagator->_remoteFolder + _item->_file; auto headers = PropagateUploadFileCommon::headers(); - // Rename the If-Match header to "OC-If-Destination-Match" // "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["OC-If-Destination-Match"] = ifMatch; + headers["If"] = "<" + destination.toUtf8() + "> ([" + ifMatch + "])"; } if (!_transmissionChecksumType.isEmpty()) { headers[checkSumHeaderC] = makeChecksumHeader(