From d2445ec72dc9562f37b48ea169cb905cbd2d087e Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 15 Jul 2014 13:33:13 +0200 Subject: [PATCH] PropagatorQNAM: Never send if-match header for new files. --- src/mirall/propagator_qnam.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp index f0d10abf54..2c2b76d189 100644 --- a/src/mirall/propagator_qnam.cpp +++ b/src/mirall/propagator_qnam.cpp @@ -208,7 +208,9 @@ void PropagateUploadFileQNAM::startNextChunk() headers["OC-Total-Length"] = QByteArray::number(fileSize); headers["Content-Type"] = "application/octet-stream"; headers["X-OC-Mtime"] = QByteArray::number(qint64(_item._modtime)); - if (!_item._etag.isEmpty() && _item._etag != "empty_etag") { + if (!_item._etag.isEmpty() && _item._etag != "empty_etag" && + _item._instruction != CSYNC_INSTRUCTION_NEW // On new files never send a If-Match + ) { // We add quotes because the owncloud server always add quotes around the etag, and // csync_owncloud.c's owncloud_file_id always strip the quotes. headers["If-Match"] = '"' + _item._etag + '"';