#25654 [Opn->Bgs]: header and sending files with double extensions
| From: | sniper@php.net | Date: | Thu, 25 Sep 2003 12:14:28 +0000 |
| Subject: | #25654 [Opn->Bgs]: header and sending files with double extensions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-48085@lists.php.net to get a copy of this message | ||
ID: 25654
Updated by: sniper@php.net
Reported By: xhemjl at tlen dot pl
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Win32
PHP Version: 4.3.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
*sigh*
Previous Comments:
------------------------------------------------------------------------
[2003-09-25 07:55:19] xhemjl at tlen dot pl
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 this bug report at http://bugs.php.net/?id=25654&edit=1