diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-12-10 19:49:31 +0100 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-12-11 21:37:06 +0100 |
commit | 07dd1aba3284761c20d9c87a81967c84c8a98cf2 (patch) | |
tree | f0a30222b5ef51b91b40fa2e073b37a3dbd0584e /src | |
parent | e40ea3913a9501a3d62b944bbb7d49ba1052f52e (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')
-rw-r--r-- | src/capi.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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... */ |