|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-25 08:14 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 09:00:02 2025 UTC |
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