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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 01:01:30 2024 UTC