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

github.com/nextcloud/desktop.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 /src/gui/owncloudsetupwizard.cpp
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 'src/gui/owncloudsetupwizard.cpp')
-rw-r--r--src/gui/owncloudsetupwizard.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp
index 53e360e41..22ac50b0e 100644
--- a/src/gui/owncloudsetupwizard.cpp
+++ b/src/gui/owncloudsetupwizard.cpp
@@ -594,9 +594,7 @@ DetermineAuthTypeJob::DetermineAuthTypeJob(AccountPtr account, QObject *parent)
void DetermineAuthTypeJob::start()
{
- QNetworkReply *reply = getRequest(account()->davPath());
- setReply(reply);
- setupConnections(reply);
+ sendRequest("GET", account()->davUrl());
AbstractNetworkJob::start();
}
@@ -613,8 +611,7 @@ bool DetermineAuthTypeJob::finished()
// do a new run
_redirects++;
resetTimeout();
- setReply(getRequest(redirection));
- setupConnections(reply());
+ sendRequest("GET", redirection);
return false; // don't discard
} else {
#ifndef NO_SHIBBOLETH