Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220669 - net-misc/d4x-2.5.7.1-r2: Content-Disposition bug
Summary: net-misc/d4x-2.5.7.1-r2: Content-Disposition bug
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 271645
  Show dependency tree
 
Reported: 2008-05-06 19:49 UTC by Nao Nakashima
Modified: 2009-08-10 08:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
bugfix (d4x-2.5.7.1-cd.patch,673 bytes, patch)
2008-05-06 19:51 UTC, Nao Nakashima
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nao Nakashima 2008-05-06 19:49:53 UTC
When file name in "Content-Disposition:" header same as in URL (or entered manually in "Save download to file" field) d4x is trying to copy file to itself that results to trunicating file to 0 bytes.

Reproducible: Always

Steps to Reproduce:
1.
-------------------------------
cd htdocs
cat << EOF > download.php
<?php 
header('Content-Disposition: attachment; filename=file.zip');
readfile('av-330.gif');
?>
EOF

echo "RewriteRule ^file.zip$ /download.php" >> .htaccess
-------------------------------

2. Create av-330.gif ;)

3. Add "http://host/file.zip" download in d4x
Actual Results:  
The file has zero size.

Expected Results:  
d4x must check that filenames are equal.

Patch attached. Actually it adds only one line;)
I`m tried to contact developer of d4x, but he didn`t answer.
Comment 1 Nao Nakashima 2008-05-06 19:51:53 UTC
Created attachment 152159 [details, diff]
bugfix
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2009-08-10 08:41:17 UTC
gone