aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/import_export/KeyUploadDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-03-02 18:22:27 +0000
committersaturneric <[email protected]>2024-03-02 18:22:27 +0000
commit3a0b2bd05af92fff313dcc6fa34fb87ac8030746 (patch)
tree420cc23dc12ca947e39906981c8814e04b51e0c4 /src/ui/dialog/import_export/KeyUploadDialog.cpp
parentfix: change GpgFrontend to Gpg Frontend on linux platform (diff)
parentfeat: add user agent header when doing http request (diff)
downloadGpgFrontend-3a0b2bd05af92fff313dcc6fa34fb87ac8030746.tar.gz
GpgFrontend-3a0b2bd05af92fff313dcc6fa34fb87ac8030746.zip
Merge branch 'dev/2.1.2/main' into develop
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");