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:
authorckamm <mail@ckamm.de>2017-01-13 16:44:45 +0300
committerMarkus Goetz <markus@woboq.com>2017-01-13 16:44:45 +0300
commitd76e0ec6d8a730b34e1f522b377f20a9d0e0aa70 (patch)
tree018b5b13409a5ddfd37d2f72e6f5ebfcf8679465 /src/libsync/capabilities.h
parent4a83f976e191a0289d50b792c146cb286aabadce (diff)
Reset stuck chunked uploads eventually #5344 (#5443)
Previously this wasn't happening for errors that were not NormalErrors because they don't end up in the blacklist. This revises the resetting logic to be independent of the error blacklist and make use of UploadInfo::errorCount instead. 412 errors should reset chunked uploads because they might be indicative of a checksum error. Additionally, server bugs might require that additional errors cause an upload reset. To allow that, a new capability is added that can be used to advise the client about this.
Diffstat (limited to 'src/libsync/capabilities.h')
-rw-r--r--src/libsync/capabilities.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libsync/capabilities.h b/src/libsync/capabilities.h
index 76e2b6f22..e3d8c013c 100644
--- a/src/libsync/capabilities.h
+++ b/src/libsync/capabilities.h
@@ -81,6 +81,25 @@ public:
*/
QByteArray uploadChecksumType() const;
+ /**
+ * List of HTTP error codes should be guaranteed to eventually reset
+ * failing chunked uploads.
+ *
+ * The resetting works by tracking UploadInfo::errorCount.
+ *
+ * Note that other error codes than the ones listed here may reset the
+ * upload as well.
+ *
+ * Motivation: See #5344. They should always be reset on 412 (possibly
+ * checksum error), but broken servers may also require resets on
+ * unusual error codes such as 503.
+ *
+ * Path: dav/httpErrorCodesThatResetFailingChunkedUploads
+ * Default: []
+ * Example: [503, 500]
+ */
+ QList<int> httpErrorCodesThatResetFailingChunkedUploads() const;
+
private:
QVariantMap _capabilities;
};