Skip to content

Commit

Permalink
Ignore RedirectionTargetAttribute if we are a OC-Connection-Validator…
Browse files Browse the repository at this point in the history
… job
  • Loading branch information
TheOneRing committed Dec 9, 2020
1 parent bd2e972 commit 48232c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/abstractnetworkjob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void AbstractNetworkJob::slotFinished()
if (!_account->credentials()->stillValid(_reply) && !_ignoreCredentialFailure) {
_account->handleInvalidCredentials();
}
if (!reply()->attribute(QNetworkRequest::RedirectionTargetAttribute).isNull()) {
if (!reply()->attribute(QNetworkRequest::RedirectionTargetAttribute).isNull() && !reply()->request().hasRawHeader(QByteArrayLiteral("OC-Connection-Validator"))) {
Q_EMIT _account->unknownConnectionState();
qCWarning(lcNetworkJob) << "Unsupported redirect on" << _reply->url().toString() << "to" << reply()->attribute(QNetworkRequest::RedirectionTargetAttribute).toString();
Q_EMIT networkError(_reply);
Expand Down

0 comments on commit 48232c5

Please sign in to comment.