[Bug 153672] New: kmimetypefinder doesn't report pdfs with non-pdf extension as application/pdf
Armin Berres
trigger at space-based.de
Sat Dec 8 12:25:26 CET 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=153672
Summary: kmimetypefinder doesn't report pdfs with non-pdf
extension as application/pdf
Product: kdelibs
Version: unspecified
Platform: Compiled Sources
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kdelibs-bugs kde org
ReportedBy: trigger space-based de
Version: (using KDE Devel)
Installed from: Compiled sources
OS: Linux
It seems as if kde uses the extension of a file to determine it's mime type.
When you have a pdf which is called foo.cgi e.g. (in my case created on the fly by a broken webpage) kmimetypefinder reports this as
| application/x-cgi
| (accuracy 100)
If I use 'file' I get the following:
| PDF document, version 1.4
Because of the wrong mime type the pdf can't be opened by okular.
The interesting thing: pdfs with a non-standard extension (.fweeg or whatever) are correctly classified as pdf.
How to reproduce:
Take a pdf file with .pdf extension, run kmimetypefinder on it -> application/pdf is reported
Change the extension to .cgi, run kmimetypefinder on it -> application/x-cgi is reported
The same happens with .txt or .wav, or...
More information about the Kdelibs-bugs
mailing list