From 20ae3b2dafa16cdfb7bc72e4810a188baf8d5a3b Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 10 May 2023 20:46:41 +0800 Subject: [PATCH] MDL-78198 file: Stop sending the Accept-Charset header in curl See notes on: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset Warning: Do not use this header. Browsers omit this header and servers should ignore it. The Accept-Charset request HTTP header was a header that advertised a client's supported character encodings. It is no longer widely used. UTF-8 is well-supported and the overwhelmingly preferred choice for character encoding. To guarantee better privacy through less configuration-based entropy, all browsers omit the Accept-Charset header. --- lib/filelib.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/filelib.php b/lib/filelib.php index d1b9a5e4b31..d21423e4d23 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3513,7 +3513,6 @@ class curl { if (empty($this->header)) { $this->setHeader(array( 'User-Agent: ' . $useragent, - 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'Connection: keep-alive' )); } else if (!in_array('User-Agent: ' . $useragent, $this->header)) {