Bugzilla – Bug 119173
apache2: OpenOffice2 documents appear as zip-files to Internet Explorer
Last modified: 2006-02-09 15:17:25 UTC
Apache2 serves OpenOffice_org2 document types as zip-files to the Internet Explorer. Firefox is intelligent enough to use the suffix in that case. How to reproduce: Install apache2 and OpenOffice2. Configure apache2 and start it. Put some OpenOffice2 documents in, e.g. /srv/www/htdocs/users/ Open http://<machine>/users/<OOo2-document-name> in Internet Explorer. Most of them will appear as zip-file, even if OOo2 is installed on the Windows machine. I think Apache2 has no information, what mime-type these documents are. OpenOffice2 document types are not defined in /etc/apache2/*, but /etc/mime.types is included. In /etc/mime.types the document types of OpenOffice2 are missing. They are defined in /usr/share/mime, but that does not help for apache2. So probably the Summary should be: missing mime-types for OOo2.
i put all maintainers in cc: please decide who can fix this and assign the bug to yourself. thanks
And what about generating of /etc/mime.types from Shared MIME Info It is simple: ( shopt -s nullglob ; IFS="$IFS:" ; for dir in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do for file in $dir/mime/packages/*.xml ; do sed -n 's/.*<mime-type type="\([^"]*\).*/\1:/p;s/.*<glob pattern="\*.\([^"]*\).*/ \1/p;s:.*</mime-type>.*:#:p' $file | tr -d '\n' | tr '#' '\n' ; done ; done ) The only problem caused by this stupid script is: application/x-tex-gf: *gf
Those mime types should be submitted upstreas (ftp://ftp.iana.org/assignments/media-types/) and added to /etc/mime.types (which our apache uses). -> Rudi?
yes, iana is definitely the way to go. I'll try to get something into aaa_base to sync these files with upstream.
IANA does not provide file suffixes, only list of types and short descriptions. And IANA does not care anout x-* MIME types. It would be better to use freedesktop.org. It is maintained and contains things you need.
The mime types are in http://framework.openoffice.org/documentation/mimetypes/mimetypes.html scroll down to the end for "Sample mime.types entries"
Same behaviour in Final release.
yes. moving to 10.1
updated mime.types from dist/unpacked/i386.full with the script similar to comment #2 for dir in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do for file in $dir/mime/packages/*.xml ; do sed -n 's/.*<mime-type type="\([^"]*\).*/\1/p;s/.*<glob pattern="\*.\([^"]*\).*/ \1/p;s:.*</mime-type>.*:#:p' $file | tr -d '\n' | tr '#' '\n'r; done; done | sort -u
closing