From: xhemjl at tlen dot pl Operating system: Win32 PHP version: 4.3.3 PHP Bug Type: Apache2 related Bug description: header and sending files with double extensions
Description: ------------ problem with header and extensions. I've got counter script. I simply download files as: counter.php?file=xyz then in MySQL I check links for xyz and if found i send the file to browser using header("Location: $url"); on Apache 1.3.x everything is OK on Apache 2.0.x(All 2.0.x!!) there is problem with double extensions e.g.: file_name.tar.gz - it is send as file_name.tar.tar!!!! single extensions works fine e.g.: pdf, zip etc. Reproduce code: --------------- <? if(isset($_GET["file"])) $url=check($_GET["file"]); if(isset($url)) header("Location: ".$url); else "There is no ".$_GET["file"]." file in our database!"; ?> Expected result: ---------------- files with single extension are send - OK. when i download with this script files e.g.: file.tar.gz it is send as file.tar.tar where on Apache 1.3.x it was sent as file.tar.gz Actual result: -------------- see: Expected result -- Edit bug report at http://bugs.php.net/?id=25654&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25654&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25654&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25654&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25654&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25654&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25654&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25654&r=support Expected behavior: http://bugs.php.net/fix.php?id=25654&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25654&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25654&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25654&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25654&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25654&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25654&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25654&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25654&r=float