Bug 124815 - Dynamically generated download downloading as download.php
Summary: Dynamically generated download downloading as download.php
Status: RESOLVED DUPLICATE of bug 57590
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-03 10:11 UTC by Alan Prescott
Modified: 2006-04-09 09:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Eample PHP script which generates the error (665 bytes, text/plain)
2006-04-08 15:37 UTC, Alan Prescott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Prescott 2006-04-03 10:11:45 UTC
Version:           3.5.2 (using KDE 3.5.2 Level "a" , SUSE 10.0 UNSUPPORTED)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.13-15.8-default

Example site
http://www.parallelrealities.co.uk/blobAndConquer.php#Downloads
Click on blobAndConquer-0.1-1.tar.gz link to download the file
The link href is
http://www.parallelrealities.co.uk/download.php?file=blobAndConquer-0.1-1.tar.gz&type=zip
so it's presumably a dynamically generated file.
Konqueror offers to save a file called download.php which it does - when the file is downloaded and examined it turns out to be blobAndConquer-0.1-1.tar.gz.
Ok so there is probably something not quite correct in the headers generated by the download.php script but the script produces the correct filename for download under Firefox.
Comment 1 Philip Rodrigues 2006-04-04 23:06:23 UTC
Can't confirm: Suggested filename here is blobAndConquer-0.1-1.tar.gz
Comment 2 Thiago Macieira 2006-04-05 12:56:02 UTC
I cannot reproduce either. The HTTP headers contain:

kio_http: (14248) "Content-disposition: filename=blobAndConquer-0.1-1.tar.gz"

which should cause it to offer that suggestion.

KDE 3.5.2 r522440
Comment 3 Alan Prescott 2006-04-05 18:24:10 UTC
I've run this on 2 different machines both SuSE 10.0, KDE 3.5.2, one as i386 and the other as x86_64 architecture and both give this same bug. 
In each case the Save as window correctly shows the filename blobAndConquer-0.1-1.tar.gz but if I click on Save As it is named download.php for the save.

Is there some setting of konqueror or KDE that may be out on my implementations?
Comment 4 Tommi Tervo 2006-04-05 18:53:27 UTC
You should be more precice. RMB -> save link as -> download.php
But if you click that links and choose save as -> blobAndConquer-0.1-1.tar.gz


I've feeling that this is a dupe, but no time to hunt it.
Comment 5 Alan Prescott 2006-04-08 14:14:47 UTC
Ok - to be precise ...

LMB produces SaveAs window showing filename blobAndConquer-0.1-1.tar.gz but then saves the file as download.php.

RMB popup menu offers ...
Save Link As - runs the download through kget offering to save as download.php which it does unless I override the filename.

Copy To - saves file as download.php

I did look for a duplicate bug before reporting this but I couldn't find one.

Do you need any more information about my system?
Comment 6 Alan Prescott 2006-04-08 15:37:11 UTC
Created attachment 15515 [details]
Eample PHP script which generates the error

As a follow-on...
I'm including a PHP script called download.php which follows the same behaviour

Install it in a test web host with a text file called testfile.txt
Under konqueror, accessing the URL http://my_test_host_url/download.php brings
up the SaveAs dialogue showing
  Open 'http://my_test_host_url/download.php'?
  Name: generated.txt
  Type: Plain Text Document
Clicking on SaveAs saves the file as download.php.
If you access the same URL with Firefox it saves the file as generated.txt.
It wouldn't surprise me if my HTML headers are incorrect - I spent a fair
amount of time surfing around to find out how to do this (download a generated
file that) and just copied bits from suggested PHP scripts.
My contention is that, if this works with Firefox and IE, it ought to work with
Konqueror.
Comment 7 Tommi Tervo 2006-04-08 16:28:37 UTC

*** This bug has been marked as a duplicate of 57590 ***
Comment 8 Alan Prescott 2006-04-09 09:38:31 UTC
On Saturday 08 April 2006 15:28, Tommi Tervo wrote:
[bugs.kde.org quoted mail]

Thanks 

Sorry I didn't spot the duplicate (kio_http instead of konqueror)

Alan