Bug 13700 - *.cgi pattern should be removed from application/x-cgi
Summary: *.cgi pattern should be removed from application/x-cgi
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-17 04:50 UTC by David Faure
Modified: 2008-04-10 02:09 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Faure 2007-12-17 04:50:17 UTC
http://bugs.kde.org/show_bug.cgi?id=153672

A PDF file named foo.cgi, e.g. saved from the web
with no suggested filename (content-disposition header iirc), isn't detected as PDF.

Would you agree with removing the *.cgi extension for application/x-cgi?

The problem is, there isn't any possible magic for application/x-cgi since a cgi is "any executable that is put on a webserver"...
In KDE 3 we didn't have a cgi mimetype at all. A cgi is a just a role played
by a perl/shell/python/ruby script or by a binary... So the extension doesn't mean much (and the mimetype neither, IMHO).
Comment 1 David Faure 2008-03-27 03:04:02 UTC
Ping?
Comment 2 Bastien Nocera 2008-04-09 08:29:47 UTC
What's the difference with the ASP, or PHP mime-types then? Broken webserver all the same.
Comment 3 David Faure 2008-04-10 01:49:23 UTC
The difference is that PHP is an actual programming language. It is actually useful to have a PHP mimetype and to associate *.php files with it. (I believe the same applies to ASP).

However CGIs can be anything. From perl to python to C-compiled binaries to shellscript to whatever else one wants to use as the "script that spits out HTML". I cannot see any usefulness in the mimetype application/x-cgi. If foo.cgi is a perl script then it should be detected as application/x-perl, not as application/x-cgi.
Comment 4 Bastien Nocera 2008-04-10 02:09:04 UTC
Makes sense.

* freedesktop.org.xml.in: Remove application/x-cgi mime-type, it's
not text/plain (could be a binary), so it should be handled as its
real type, as discovered by sniffing (Closes: #13700)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.