From e66eabc553f3004dade2c869756fbff8ddc7bc03 Mon Sep 17 00:00:00 2001
From: Lennart Poettering
Version +0.2 released; changes include: look for both user.mime_type and user.mime-type for compliance with XDG
+Version 0.1 released
@@ -58,13 +62,13 @@ href="http://acl.bestbits.at/">ACL/EA patches applied and vanilla Linux 2.6. The following attributes may be used:If you add the new line before mod_mime, the latter will overwrite the MIME type settings mod_mime_xattr -detected. Thus the extension of a file is more important than the EA user.mime-type. If specified in the opposite +detected. Thus the extension of a file is more important than the EA user.mime_type. If specified in the opposite order (which is recommended), the values set in the EAs take precedence.
@@ -96,8 +100,8 @@ precedence. configuration directives:A simple usage example:
@@ -114,20 +118,20 @@ configuration directives: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+
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.
+user.mime_type EA is set as well.You may use the user.apache-handler EA to mark a file as CGI script:
+You may use the user.apache_handler EA to mark a file as CGI script:
-setfattr -n "user.apache-handler" -v "cgi-script" foo.html+
setfattr -n "user.apache_handler" -v "cgi-script" foo.html
This will force the execution of foo.html as CGI program, regardless of the name of the file which identifies it as an HTML @@ -137,7 +141,7 @@ file.
your Apache web server you may mark a file as PHP script regardless of its name: -setfattr -n "user.mime-type" -v "application/x-httpd-php" bar.html+
setfattr -n "user.mime_type" -v "application/x-httpd-php" bar.html
Think twice before enabling mod_mime_xattr for document trees you do not trust because a rogue user may mark his files as -- cgit