#37135 [NEW]: header(Content-Type: mime_type) must have a leading before the mime_type
| From: | nbari at mac dot com | Date: | Wed, 19 Apr 2006 10:39:30 +0000 |
| Subject: | #37135 [NEW]: header(Content-Type: mime_type) must have a leading before the mime_type | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-95985@lists.php.net to get a copy of this message | ||
From: nbari at mac dot com
Operating system: Mac OS X version 10.4.6
PHP version: 5.1.2
PHP Bug Type: *General Issues
Bug description: header(Content-Type: mime_type) must have a leading before the mime_type
Description:
------------
a leading slash must be used on the mime_tye to get Content-
Type to work:
header("Content-Type: audio/x-ms-wma"); do not work
header("Content-Type: /audio/x-ms-wma"); it works
Reproduce code:
---------------
<?php
header("Content-Type: audio/x-ms-wma");
header("Content-Disposition: filename=\"file.wma\"");
readfile("/Volumes/RamDisk/file.wma");
?>
if audio/x-ms-wma is replaced with /audio/x-ms-wma so it looks like :
header("Content-Type: /audio/x-ms-wma");
the code works.
with out the leading / the code do not work.
Expected result:
----------------
the windows media player to open the wma file or the option
for saving the file.
--
Edit bug report at http://bugs.php.net/?id=37135&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37135&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37135&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37135&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37135&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37135&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37135&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37135&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37135&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37135&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37135&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37135&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37135&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37135&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37135&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37135&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37135&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37135&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37135&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37135&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37135&r=mysqlcfg