From: Christoph M. Becker Date: Mon, 8 Mar 2021 14:08:11 +0000 (+0100) Subject: Merge branch 'PHP-7.4' into PHP-8.0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7931956805beba80188f3c0638c285f8fb75dfe1;p=php Merge branch 'PHP-7.4' into PHP-8.0 * PHP-7.4: Fix #51903: simplexml_load_file() doesn't use HTTP headers --- 7931956805beba80188f3c0638c285f8fb75dfe1 diff --cc NEWS index 46bf8239aa,4ccac5378f..4ca029d681 --- a/NEWS +++ b/NEWS @@@ -15,9 -11,18 +15,12 @@@ PH . Fixed bug #80763 (msgfmt_format() does not accept DateTime references). (cmb) + - Libxml: + . Fixed bug #51903 (simplexml_load_file() doesn't use HTTP headers). (cmb) + -- MySQLnd: - . Fixed bug #80713 (SegFault when disabling ATTR_EMULATE_PREPARES and - MySQL 8.0). (Nikita) - -- opcache: - . Fixed bug #80805 (create simple class and get error in opcache.so). (Nikita) - -- phpdbg: - . Fixed bug #80757 (Exit code is 0 when could not open file). (Felipe) +- Opcache: + . Fixed bug #80786 (PHP crash using JIT). (Nikita) + . Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1). (Dmitry) - Session: . Fixed bug #80774 (session_name() problem with backslash). (cmb) diff --cc ext/libxml/tests/bug51903.phpt index 0000000000,36a4b55704..ebbca2068c mode 000000,100644..100644 --- a/ext/libxml/tests/bug51903.phpt +++ b/ext/libxml/tests/bug51903.phpt @@@ -1,0 -1,38 +1,38 @@@ + --TEST-- + Bug #51903 (simplexml_load_file() doesn't use HTTP headers) + --SKIPIF-- + + --FILE-- + \n" + . "\xE4\xF6\xFC\n", + "data://text/plain,HTTP/1.1 200 OK\r\n" + . "Content-Type: text/xml; charset=ISO-8859-1; foo=bar\r\n\r\n" + . "\n" + . "\xE4\xF6\xFC\n", + "data://text/plain,HTTP/1.1 200 OK\r\n" + . "Content-Type: text/xml; charset=\"ISO-8859-1\" ; foo=bar\r\n\r\n" + . "\n" + . "\xE4\xF6\xFC\n", + ]; -$pid = http_server('tcp://127.0.0.1:12342', $responses); ++['pid' => $pid, 'uri' => $uri] = http_server($responses); + + for ($i = 0; $i < count($responses); $i++) { - $sxe = simplexml_load_file('http://127.0.0.1:12342/'); ++ $sxe = simplexml_load_file($uri); + echo "$sxe\n"; + } + + http_server_kill($pid); + ?> + --EXPECT-- + äöü + äöü + äöü