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:
authorChristian Kamm <mail@ckamm.de>2017-03-03 13:20:53 +0300
committerckamm <mail@ckamm.de>2017-03-07 15:18:01 +0300
commit4a1a5fa0764d2dbed076cfeb17e9aee6a4b856b7 (patch)
tree55bc28a6a1a5ba84faeec12a4af748dbe51e3624 /test/syncenginetestutils.h
parent298684aaa07b970065b5b681f9d2b855f3824988 (diff)
AbstractNetworkJob: Improve redirect handling #5555
* For requests: - reuse the original QNetworkRequest, so headers and attributes are the same as in the original request - determine the original http method from the reply and the request attributes - keep the original request body around such that it can be sent again in case the request is redirected * Simplify the interface that is used for creating new requests in AbstractNetworkJob.
Diffstat (limited to 'test/syncenginetestutils.h')
-rw-r--r--test/syncenginetestutils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h
index 937bf35fd..64b063284 100644
--- a/test/syncenginetestutils.h
+++ b/test/syncenginetestutils.h
@@ -730,13 +730,13 @@ protected:
if (verb == QLatin1String("PROPFIND"))
// Ignore outgoingData always returning somethign good enough, works for now.
return new FakePropfindReply{info, op, request, this};
- else if (verb == QLatin1String("GET"))
+ else if (verb == QLatin1String("GET") || op == QNetworkAccessManager::GetOperation)
return new FakeGetReply{info, op, request, this};
- else if (verb == QLatin1String("PUT"))
+ else if (verb == QLatin1String("PUT") || op == QNetworkAccessManager::PutOperation)
return new FakePutReply{info, op, request, outgoingData->readAll(), this};
else if (verb == QLatin1String("MKCOL"))
return new FakeMkcolReply{info, op, request, this};
- else if (verb == QLatin1String("DELETE"))
+ else if (verb == QLatin1String("DELETE") || op == QNetworkAccessManager::DeleteOperation)
return new FakeDeleteReply{info, op, request, this};
else if (verb == QLatin1String("MOVE") && !isUpload)
return new FakeMoveReply{info, op, request, this};