From 4e288de351cc63991d48b839cfa8f50023526b6a Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 25 Feb 2023 13:28:14 +0000 Subject: [PATCH] allow Server subclasses to use their own parser for charset detection --- src/Server.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.0