php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25654 header and sending files with double extensions
Submitted: 2003-09-25 07:55 UTC Modified: 2003-09-25 08:14 UTC
From: xhemjl at tlen dot pl Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.3 OS: Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: xhemjl at tlen dot pl
New email:
PHP Version: OS:

 

 [2003-09-25 07:55 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-25 08:14 UTC] sniper@php.net
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*

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 21:01:33 2025 UTC