Bug #75380 [NEW]: finfo_file treats XML file as text/xml
| From: | d dot naumenko dot a at gmail dot com | Date: | Sun, 15 Oct 2017 08:50:16 +0000 |
| Subject: | Bug #75380 [NEW]: finfo_file treats XML file as text/xml | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-211692@lists.php.net to get a copy of this message | ||
From: d dot naumenko dot a at gmail dot com
Operating system: 3v4l
PHP version: 7.2.0RC4
Package: Filesystem function related
Bug Type: Bug
Bug description:finfo_file treats XML file as text/xml
Description:
------------
Before PHP 7.2.0 alpha1, function
finfo_ function called on XML input
returned mime-type application/xml. Since PHP7.2 alpha1 it returns
text/xml.
When I put the same XML document as in test script bellow to the file
and call linux program file on it, I see expected result:
$> file --mime-type test.xml
test.xml: application/xml
Test script:
---------------
https://3v4l.org/QDKAp
Expected result:
----------------
application/xml
Actual result:
--------------
text/xml
--
Edit bug report at https://bugs.php.net/bug.php?id=75380&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75380&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75380&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75380&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75380&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75380&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75380&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75380&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75380&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75380&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75380&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75380&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75380&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75380&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75380&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75380&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75380&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75380&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75380&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75380&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75380&r=mysqlcfg