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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
33 - 12 = ?
Subscribe to this entry?

 
 [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: Mon Jul 01 04:01:29 2024 UTC