auto *job = new PropfindJob(account, "/", this);
job->setIgnoreCredentialFailure(true);
+ // There is custom redirect handling in the error handler,
+ // so don't automatically follow redirects.
+ job->setFollowRedirects(false);
job->setProperties(QList<QByteArray>() << "getlastmodified");
connect(job, SIGNAL(result(QVariantMap)), _ocWizard, SLOT(successfulStep()));
connect(job, SIGNAL(finishedWithError()), this, SLOT(slotAuthError()));
_ignoreCredentialFailure = ignore;
}
+void AbstractNetworkJob::setFollowRedirects(bool follow)
+{
+ _followRedirects = follow;
+}
+
void AbstractNetworkJob::setPath(const QString &path)
{
_path = path;
void setIgnoreCredentialFailure(bool ignore);
bool ignoreCredentialFailure() const { return _ignoreCredentialFailure; }
+ /** Whether to handle redirects transparently.
+ *
+ * If true, a follow-up request is issued automatically when
+ * a redirect is encountered. The finished() function is only
+ * called if there are no more redirects (or there are problems
+ * with the redirect).
+ *
+ * The transparent redirect following may be disabled for some
+ * requests where custom handling is necessary.
+ */
+ void setFollowRedirects(bool follow);
+
QByteArray responseTimestamp();
qint64 timeoutMsec() { return _timer.interval(); }