From: gggeek <giunta.gaetano@gmail.com> Date: Sat, 25 Feb 2023 13:28:14 +0000 (+0000) Subject: allow Server subclasses to use their own parser for charset detection X-Git-Tag: 4.10.2~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4e288de351cc63991d48b839cfa8f50023526b6a;p=plcapi.git allow Server subclasses to use their own parser for charset detection --- diff --git a/src/Server.php b/src/Server.php index e0436d3f..8c24d5eb 100644 --- a/src/Server.php +++ b/src/Server.php @@ -654,7 +654,8 @@ class Server // 'guestimate' request encoding /// @todo check if mbstring is enabled and automagic input conversion is on: it might mingle with this check??? - $reqEncoding = XMLParser::guessEncoding(isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '', + $parser = $this->getParser(); + $reqEncoding = $parser->guessEncoding(isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : '', $data); return null;