mod_mime_xattr 0.3 reviewDownload
mod_mime_xattr is a simple Apache HTTPD module that lets you use file system extended attributes data for MIME type detection. The
mod_mime_xattr is a simple Apache HTTPD module that lets you use file system extended attributes data for MIME type detection.
The current version of mod_mime_xattr has support for Linux style EAs which are supported by Linux 2.4 with the ACL/EA patches applied and vanilla Linux 2.6. The following attributes may be used:
user.mime_type: set the MIME type of a file explicitly. This attribute is compatible with the shared MIME database specification as published by freedesktop.org
user.charset: set the charset used in a file
user.mime_encoding: set the MIME encoding of a file (e.g. gzip)
user.apache_handler: set the apache handler of a file explicitly
You may get/set an extended attribute for a file with the Linux command line utilities getfattr/setfattr:
setfattr -n "user.mime_type" -v "text/html" foo.file
The file foo.file will be served as HTML now. For more information consult the concerning man pages.
If used with symbolic links, mod_mime_xattr will first check if an EA is set for the symlink itself, and second for the file the link points to. The user.charset EA is only used when the user.mime_type EA is set as well.
What's New in This Release:
Ported to Apache 2.0.
mod_mime_xattr 0.3 search tags