summaryrefslogtreecommitdiff
path: root/src/capi.c
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-12-10 19:49:31 +0100
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-12-11 21:37:06 +0100
commit07dd1aba3284761c20d9c87a81967c84c8a98cf2 (patch)
treef0a30222b5ef51b91b40fa2e073b37a3dbd0584e /src/capi.c
parente40ea3913a9501a3d62b944bbb7d49ba1052f52e (diff)
Use Dillo user agent for downloads too
Send the user agent to the downloads DPI so we can use the same as Dillo uses from the http_user_agent option. See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/A6IHJ4TBGHJ3CT2UOMEAROSG2WRTRO6U/
Diffstat (limited to 'src/capi.c')
-rw-r--r--src/capi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/capi.c b/src/capi.c
index fb992fe4..0e6ef82e 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -2,7 +2,7 @@
* File: capi.c
*
* Copyright 2002-2007 Jorge Arellano Cid <jcid@dillo.org>
- * Copyright 2023 Rodrigo Arias Mallo <rodarima@gmail.com>
+ * Copyright 2023-2024 Rodrigo Arias Mallo <rodarima@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,6 +32,7 @@
#include "uicmd.hh"
#include "domain.h"
#include "../dpip/dpip.h"
+#include "prefs.h"
/* for testing dpi chat */
#include "bookmark.h"
@@ -305,8 +306,9 @@ static char *Capi_dpi_build_cmd(DilloWeb *web, char *server)
if (strcmp(server, "downloads") == 0) {
/* let the downloads server get it */
- cmd = a_Dpip_build_cmd("cmd=%s url=%s destination=%s",
- "download", URL_STR(web->url), web->filename);
+ cmd = a_Dpip_build_cmd("cmd=%s url=%s destination=%s user-agent=%s",
+ "download", URL_STR(web->url), web->filename,
+ prefs.http_user_agent);
} else {
/* For everyone else, the url string is enough... */