From 7872695be710dcd2de554b218462d14062d89064 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 11 Apr 2024 20:17:31 +0200 Subject: Use the current version in wget user agent Fixes: https://github.com/dillo-browser/dillo/issues/130 --- dpi/downloads.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dpi/downloads.cc b/dpi/downloads.cc index 2eff2aef..4c3aae3e 100644 --- a/dpi/downloads.cc +++ b/dpi/downloads.cc @@ -2,6 +2,7 @@ * File: downloads.cc * * Copyright (C) 2005-2007 Jorge Arellano Cid + * Copyright (C) 2024 Rodrigo Arias Mallo * * 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 @@ -41,6 +42,7 @@ #include #include +#include "config.h" #include "dpiutil.h" #include "../dpip/dpip.h" @@ -320,11 +322,12 @@ DLItem::DLItem(const char *full_filename, const char *url) Filter_smtp_hack(esc_url); dl_argv = new char*[10]; int i = 0; + const char *user_agent = "dillo/" VERSION; dl_argv[i++] = (char*)"wget"; if (stat(fullname, &ss) == 0) init_bytesize = (int)ss.st_size; dl_argv[i++] = (char*)"-U"; - dl_argv[i++] = (char*)"dillo/3.0.5"; + dl_argv[i++] = (char*) user_agent; dl_argv[i++] = (char*)"-c"; dl_argv[i++] = (char*)"--load-cookies"; dl_argv[i++] = dStrconcat(dGethomedir(), "/.dillo/cookies.txt", NULL); -- cgit v1.2.3