mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
detect recursive redirects
This commit is contained in:
parent
c02cf5e89e
commit
2dd6e4db43
1 changed files with 9 additions and 1 deletions
|
|
@ -76,7 +76,15 @@ void CardPictureLoaderWorkerWork::handleNetworkReply(QNetworkReply *reply)
|
||||||
if (redirectUrl.isRelative()) {
|
if (redirectUrl.isRelative()) {
|
||||||
redirectUrl = url.resolved(redirectUrl);
|
redirectUrl = url.resolved(redirectUrl);
|
||||||
}
|
}
|
||||||
emit urlRedirected(url, redirectUrl);
|
if (url == redirectUrl) {
|
||||||
|
qCWarning(CardPictureLoaderWorkerWorkLog) << "recusive redirect detected!";
|
||||||
|
qCWarning(CardPictureLoaderWorkerWorkLog) << "refusing to load" << redirectTarget;
|
||||||
|
reply->deleteLater();
|
||||||
|
picDownloadFailed();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
emit urlRedirected(url, redirectUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply->error()) {
|
if (reply->error()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue