aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/import_export/KeyUploadDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-02-26 12:38:30 +0000
committersaturneric <[email protected]>2024-02-26 12:38:30 +0000
commit59cdf57e8f807a0fe2505837e2eed5871ea281c8 (patch)
tree420cc23dc12ca947e39906981c8814e04b51e0c4 /src/ui/dialog/import_export/KeyUploadDialog.cpp
parentfix: add English translation (diff)
downloadGpgFrontend-59cdf57e8f807a0fe2505837e2eed5871ea281c8.tar.gz
GpgFrontend-59cdf57e8f807a0fe2505837e2eed5871ea281c8.zip
feat: add user agent header when doing http request
Diffstat (limited to 'src/ui/dialog/import_export/KeyUploadDialog.cpp')
-rw-r--r--src/ui/dialog/import_export/KeyUploadDialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/dialog/import_export/KeyUploadDialog.cpp b/src/ui/dialog/import_export/KeyUploadDialog.cpp
index f59f9daa..0e0dca4d 100644
--- a/src/ui/dialog/import_export/KeyUploadDialog.cpp
+++ b/src/ui/dialog/import_export/KeyUploadDialog.cpp
@@ -30,6 +30,7 @@
#include <QtNetwork>
+#include "GpgFrontendBuildInfo.h"
#include "core/GpgModel.h"
#include "core/function/gpg/GpgKeyGetter.h"
#include "core/function/gpg/GpgKeyImportExporter.h"
@@ -115,6 +116,7 @@ void KeyUploadDialog::slot_upload_key_to_server(
data.replace(" ", "+");
QNetworkRequest request(req_url);
+ request.setHeader(QNetworkRequest::UserAgentHeader, HTTP_REQUEST_USER_AGENT);
request.setHeader(QNetworkRequest::ContentTypeHeader,
"application/x-www-form-urlencoded");