summaryrefslogtreecommitdiff
path: root/Network/FileDownload.cpp
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /Network/FileDownload.cpp
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'Network/FileDownload.cpp')
-rw-r--r--Network/FileDownload.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Network/FileDownload.cpp b/Network/FileDownload.cpp
index 3ab2a7c6..91b9048f 100644
--- a/Network/FileDownload.cpp
+++ b/Network/FileDownload.cpp
@@ -131,6 +131,11 @@ void FileDownload::replyComplete()
void FileDownload::downloadComplete(QNetworkReply *data)
{
+ if (data != reply_)
+ {
+ return;
+ }
+
// make a temp file in the same place as the file we're downloading. Needs to be on the same
// filesystem as where we eventually want to 'mv' it.
@@ -171,7 +176,8 @@ void FileDownload::download(QUrl qurl)
LOG_INFO(QString{"FileDownload [%1]: Starting download of %2 to %3"}.arg(user_agent_).arg(source_url_).arg(destination_filename_));
- request_.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
+ request_.setAttribute(QNetworkRequest::RedirectPolicyAttribute
+ , QNetworkRequest::NoLessSafeRedirectPolicy);
request_.setRawHeader("Accept", "*/*");
request_.setRawHeader ("User-Agent", user_agent_.toLocal8Bit()); // Must have a UA for some sites, like country-files