From 46a6e2957e72d90ee4b669c8852bb1925526deea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sun, 23 Feb 2020 18:51:06 +0100 Subject: [PATCH] * src/http.c: Do not reveal OS type to server via User-Agent: header Following the "privacy by design" principle, which is now European law by virtue of the GDPR since 2018, the client should not transmit the operating system. Fixes #57884 Reported-by: Bruno Haible --- src/http.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/http.c b/src/http.c index 686db86f..816a8299 100644 --- a/src/http.c +++ b/src/http.c @@ -1783,27 +1783,15 @@ read_response_body (struct http_stat *hs, int sock, FILE *fp, wgint contlen, && (c_isspace (line[sizeof (string_constant) - 1]) \ || !line[sizeof (string_constant) - 1])) -#ifdef __VMS #define SET_USER_AGENT(req) do { \ if (!opt.useragent) \ request_set_header (req, "User-Agent", \ - aprintf ("Wget/%s (VMS %s %s)", \ - version_string, vms_arch(), vms_vers()), \ + aprintf ("Wget/%s", \ + version_string), \ rel_value); \ else if (*opt.useragent) \ request_set_header (req, "User-Agent", opt.useragent, rel_none); \ } while (0) -#else /* def __VMS */ -#define SET_USER_AGENT(req) do { \ - if (!opt.useragent) \ - request_set_header (req, "User-Agent", \ - aprintf ("Wget/%s (%s)", \ - version_string, OS_TYPE), \ - rel_value); \ - else if (*opt.useragent) \ - request_set_header (req, "User-Agent", opt.useragent, rel_none); \ -} while (0) -#endif /* def __VMS [else] */ /* Convert time_t to one of valid HTTP date formats