Bug 33769 - content-disposition filename inline http
Summary: content-disposition filename inline http
Status: CLOSED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-16 11:48 UTC by tommi
Modified: 2004-04-13 23:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tommi 2001-10-16 11:35:56 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           konqueror
Version:           KDE 2.2.1 
Severity:          normal
Installed from:    SuSE RPMs
Compiler:          Not Specified
OS:                Linux
OS/Compiler notes: Not Specified

Konqueror does not honour http-header content-disposition. I have a Perl-CGI-script here which generates a MS-Excel-file for download. When I tell konqueror to save the file it suggest the name of my CGI-script but not the filename in the http-header. The script looks like this:

#!/usr/bin/perl -w
use CGI;
use Spreadsheet::WriteExcel;
my $q=new CGI;
print $q->header(-type => 'application/ms-excel'
  -content_disposition => "inline; filename=\"some_file.xls\"");
my $wb = Spreadsheet::WriteExcel->new(\*STDOUT);
my $ws = $wb->addworksheet('ws1');
$ws->write_string(0 0 'this is a Excel worksheet');
$wb->close();

Mozilla 0.9.4 and IE 4.x suggests fine my filename some_file.xls.
It is of course not dependend of 'application/ms-exel'. You can use any type you need. But this was the case I needed it.

(Submitted via bugs.kde.org)
Comment 1 David Faure 2001-10-16 15:49:47 UTC
On Mardi 16 Octobre 2001 13:35 tommi@maekitalo.de wrote:
> Package: konqueror
> Version: KDE 2.2.1 
> Severity: normal
> Installed from:    SuSE RPMs
> Compiler:          Not Specified
> OS:                Linux
> OS/Compiler notes: Not Specified
> 
> Konqueror does not honour http-header content-disposition. I have a Perl-CGI-script here which generates a MS-Excel-file for download. When I tell konqueror to save the file it suggest the name of my CGI-script but not the filename in the http-header. The script looks like this:

Fixed in KDE 3.0-alpha1.
Actually if you could test that version of KDE or put that cgi-script online (I don't
have a running webserver) so that we can validate the fix I'll be able to backport
it for the upcoming KDE 2.2.2.

David.
Comment 2 Dawit Alemayehu 2001-10-18 04:14:45 UTC
On Tuesday 16 October 2001 07:35 tommi@maekitalo.de wrote:
> Package: konqueror
> Version: KDE 2.2.1
> Severity: normal
> Installed from:    SuSE RPMs
> Compiler:          Not Specified
> OS:                Linux
> OS/Compiler notes: Not Specified
>
> Konqueror does not honour http-header content-disposition. I have a
> Perl-CGI-script here which generates a MS-Excel-file for download. When I
> tell konqueror to save the file it suggest the name of my CGI-script but
> not the filename in the http-header. The script looks like this:
>
> #!/usr/bin/perl -w
> use CGI;
> use Spreadsheet::WriteExcel;
> my $q=new CGI;
> print $q->header(-type => 'application/ms-excel'
>   -content_disposition => "inline; filename=\"some_file.xls\"");
> my $wb = Spreadsheet::WriteExcel->new(\*STDOUT);
> my $ws = $wb->addworksheet('ws1');
> $ws->write_string(0 0 'this is a Excel worksheet');
> $wb->close();
>
> Mozilla 0.9.4 and IE 4.x suggests fine my filename some_file.xls.
> It is of course not dependend of 'application/ms-exel'. You can use any
> type you need. But this was the case I needed it.

Hi

Konqueror actually the http io-slave does honor Content-Disposition.  It is just that there was a 
couple of bugs that caused it to break under a couple of conditions.  This has already been fixed
and tested for KDE 2.2.2 release.   Thanks for the report.

Regards
Dawit A.
Comment 3 Carl Thompson 2004-04-13 23:43:43 UTC
This bug is still alive in certain situations. See bug 79597