Bug 216995

Summary: Content-type and Content-Disposition are not recognized
Product: [Applications] konqueror Reporter: Andreas Pietzowski <andreas>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Andreas Pietzowski 2009-12-01 22:51:38 UTC
Version:            (using KDE 4.3.3)
Installed from:    Ubuntu Packages

I have a PHP script that outputs the following header:

header('Content-type: application/vnd.oasis.opendocument.*');
header('Content-Disposition: attachment; filename="file.pdf"');
fwrite('file_xyz.pdf')

When I request this page with firefox it displays me the "Save as" dialog or "Open with PDF viewer". In Konqueror the binary output of that PHP script is displayed as webpage.

Normally it works with Konqueror but my site is htaccess password protected and this is the issue!

For reproducing, I created an example page:

http://www.pietzowski.de/pdf/   (optional append index.php)
User: user
Pass: pass

When you are German, you maybe would like to read the PDF after fixing the bug - try it out :-)

Thanks for fixing
Andreas
Comment 1 Andreas Pietzowski 2009-12-01 22:53:50 UTC
FYI: I meant readfile() insead of fwrite() in my PHP code but that doesn't matter for this bug - the PHP works.
Comment 2 Maksim Orlovich 2009-12-02 00:55:28 UTC

*** This bug has been marked as a duplicate of bug 205088 ***