From 0bd6fa3151978198bf6d8778df692c7a310e48fb Mon Sep 17 00:00:00 2001 From: cambrialas Date: Wed, 27 Nov 2024 21:33:07 +0100 Subject: [PATCH] lcHttpManager enable HTTP redirection --- common/lc_http.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lc_http.cpp b/common/lc_http.cpp index 0cfca2c8..e85cfb5b 100644 --- a/common/lc_http.cpp +++ b/common/lc_http.cpp @@ -81,7 +81,10 @@ lcHttpManager::lcHttpManager(QObject* Owner) lcHttpReply* lcHttpManager::lcHttpManager::DownloadFile(const QString& Url) { - return (lcHttpReply*)get(QNetworkRequest(QUrl(Url))); + QNetworkRequest req = QNetworkRequest(QUrl(Url)); + req.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy); + + return (lcHttpReply*)get(req); } void lcHttpManager::Finished(QNetworkReply* Reply)