allow Server subclasses to use their own parser for charset detection
authorgggeek <giunta.gaetano@gmail.com>
Sat, 25 Feb 2023 13:28:14 +0000 (13:28 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sat, 25 Feb 2023 13:28:14 +0000 (13:28 +0000)
src/Server.php

index e0436d3..8c24d5e 100644 (file)
@@ -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;