aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/ProxyConnectionTestTask.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-05-11 17:18:36 +0000
committerGitHub <[email protected]>2024-05-11 17:18:36 +0000
commitf909f2c4c35b187eb165ec5545e35d54c6d92bf3 (patch)
tree428fe9e63ecae6bb93be6f20cd2b1ee9b29ffd8d /src/ui/thread/ProxyConnectionTestTask.cpp
parentMerge pull request #145 from jermanuts/jermanuts-wizard-links-update (diff)
parentfix: remove qt5compat and redirect dll output path of modules (diff)
downloadGpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.tar.gz
GpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.zip
Merge pull request #148 from saturneric/develop
Develop 2.1.3.1
Diffstat (limited to 'src/ui/thread/ProxyConnectionTestTask.cpp')
-rw-r--r--src/ui/thread/ProxyConnectionTestTask.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ui/thread/ProxyConnectionTestTask.cpp b/src/ui/thread/ProxyConnectionTestTask.cpp
index b681ca6d..c1d2f3e6 100644
--- a/src/ui/thread/ProxyConnectionTestTask.cpp
+++ b/src/ui/thread/ProxyConnectionTestTask.cpp
@@ -30,6 +30,8 @@
#include <QtNetwork>
+#include "core/utils/BuildInfoUtils.h"
+
GpgFrontend::UI::ProxyConnectionTestTask::ProxyConnectionTestTask(QString url,
int timeout)
: Task("proxy_connection_test_task"),
@@ -40,7 +42,11 @@ GpgFrontend::UI::ProxyConnectionTestTask::ProxyConnectionTestTask(QString url,
}
auto GpgFrontend::UI::ProxyConnectionTestTask::Run() -> int {
- auto* network_reply = network_manager_->get(QNetworkRequest{url_});
+ auto request = QNetworkRequest(url_);
+ request.setHeader(QNetworkRequest::UserAgentHeader,
+ GetHttpRequestUserAgent());
+
+ auto* network_reply = network_manager_->get(request);
auto* timer = new QTimer(this);
connect(network_reply, &QNetworkReply::finished, this,