Bug 153672 - kmimetypefinder doesn't report pdfs with non-pdf extension as application/pdf
Summary: kmimetypefinder doesn't report pdfs with non-pdf extension as application/pdf
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-08 12:25 UTC by Armin Berres
Modified: 2008-09-27 11:13 UTC (History)
1 user (show)

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 Armin Berres 2007-12-08 12:25:26 UTC
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...
Comment 1 David Faure 2007-12-17 13:51:47 UTC
Indeed, thanks for the report.
Filed upstream as https://bugs.freedesktop.org/show_bug.cgi?id=13700
Comment 2 Felix Möller 2008-09-27 11:06:24 UTC
This is fixed upstream please close: https://bugs.freedesktop.org/show_bug.cgi?id=13700#c4
Comment 3 Urs Wolfer 2008-09-27 11:13:01 UTC
Fixed upstream.