Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2013-11-25 19:28:51 +0400
committerOlivier Goffart <ogoffart@woboq.com>2013-11-25 19:30:13 +0400
commit6b7da798b89e2abfad5ea106523cc6df066e4a58 (patch)
tree6bb4386fe9f0658b76e0839cde79e61867f6b2bc
parent2e4043b49850b793bb7687580f019c65f9b07e7b (diff)
Remove -gzip from Etag
Fix #1195
-rw-r--r--src/mirall/owncloudpropagator.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mirall/owncloudpropagator.cpp b/src/mirall/owncloudpropagator.cpp
index c9152f582..9b9db208c 100644
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@ -410,11 +410,17 @@ void PropagateUploadFile::start()
static QByteArray parseEtag(ne_request *req) {
const char *header = ne_get_response_header(req, "etag");
+ QByteArray arr;
if(header && header [0] == '"' && header[ strlen(header)-1] == '"') {
- return QByteArray(header + 1, strlen(header)-2);
+ arr = QByteArray(header + 1, strlen(header)-2);
} else {
- return header;
+ arr = header;
}
+ if (arr.endsWith("-gzip")) {
+ // https://github.com/owncloud/mirall/issues/1195
+ arr.chop(5);
+ }
+ return arr;
}
static QString parseFileId(ne_request *req) {