Bug #76254 [NEW]: mime_content_type wrong MIME TYPE

From: Date: Mon, 23 Apr 2018 16:12:23 +0000
Subject: Bug #76254 [NEW]: mime_content_type wrong MIME TYPE
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214844@lists.php.net to get a copy of this message
From:             inpost at list dot ru
Operating system: 
PHP version:      7.2.4
Package:          Filesystem function related
Bug Type:         Bug
Bug description:mime_content_type wrong MIME TYPE

Description:
------------
I try upload "wma" file ASF type. Documentation from wiki: 
The most common file extensions for ASF files are extension .WMA
(audio-only files using Windows Media Audio, with MIME-type
audio/x-ms-wma) and .WMV (files containing video, using the Windows
Media Audio and Video codecs, with MIME-type video/x-ms-asf).

mime_content_type and finfo_file return 'video/x-ms-asf', but real:
'audio/x-ms-wma' must be.
Some sites like this:
https://www.get-metadata.com/result/85b3e575-32f1-4a13-8a8c-a7e9181076bc
or http://forum.sources.ru/mime.php
return both of mime types! 
If i open file in Windows Media Player, it`s like "only audio file"
without video.

It`s must be double mime type, or only audio, not video!

Link to wma file: https://school-php.com/1.wma



Test script:
---------------
echo mime_content_type($_FILES['file']['tmp_name']);

Expected result:
----------------
video/x-ms-asf

Actual result:
--------------
audio/x-ms-wma

-- 
Edit bug report at https://bugs.php.net/bug.php?id=76254&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=76254&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=76254&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=76254&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=76254&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=76254&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=76254&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=76254&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=76254&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=76254&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=76254&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=76254&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=76254&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=76254&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76254&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=76254&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=76254&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=76254&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76254&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=76254&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=76254&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#214844) next »