diff --git a/src/libsync/abstractnetworkjob.cpp b/src/libsync/abstractnetworkjob.cpp index 73640273b2480..24826b44c77d2 100644 --- a/src/libsync/abstractnetworkjob.cpp +++ b/src/libsync/abstractnetworkjob.cpp @@ -127,6 +127,7 @@ QNetworkReply *AbstractNetworkJob::addTimer(QNetworkReply *reply) QNetworkReply *AbstractNetworkJob::sendRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, QIODevice *requestBody) { + req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); auto reply = _account->sendRawRequest(verb, url, req, requestBody); _requestBody = requestBody; if (_requestBody) { @@ -139,6 +140,7 @@ QNetworkReply *AbstractNetworkJob::sendRequest(const QByteArray &verb, const QUr QNetworkReply *AbstractNetworkJob::sendRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, const QByteArray &requestBody) { + req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); auto reply = _account->sendRawRequest(verb, url, req, requestBody); _requestBody = nullptr; adoptRequest(reply); @@ -150,6 +152,7 @@ QNetworkReply *AbstractNetworkJob::sendRequest(const QByteArray &verb, QNetworkRequest req, QHttpMultiPart *requestBody) { + req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); auto reply = _account->sendRawRequest(verb, url, req, requestBody); _requestBody = nullptr; adoptRequest(reply);