aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/thread/ProxyConnectionTestTask.cpp
diff options
context:
space:
mode:
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,