[Pkg-owncloud-commits] [owncloud-client] 211/332: PropagatorQNAM: Never send if-match header for new files.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:01 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit d2445ec72dc9562f37b48ea169cb905cbd2d087e
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Tue Jul 15 13:33:13 2014 +0200

    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 f0d10ab..2c2b76d 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 + '"';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list