Graham Dumpleton wrote:
Anyone know if there are any technical reasons why input/output filters as they exist at the moment, applying only to body content and not headers, can not be specified in a .htaccess files?Specifically, the SetInputFilter, SetOutputFilter, AddInputFilter and AddOutputFilter directives of Apache can be specified in either main server configuration or .htaccess files, yet the PythonInputFilter and PythonOutputFilter directives are only allowed to be specified in the main server configuration. This is because mod_python.c contains: AP_INIT_TAKE12("PythonInputFilter", directive_PythonInputFilter, NULL, RSRC_CONF|ACCESS_CONF,"Python input filter."), AP_INIT_TAKE12("PythonOutputFilter", directive_PythonOutputFilter, NULL, RSRC_CONF|ACCESS_CONF,"Python output filter."), If however I change it to: AP_INIT_TAKE12( "PythonInputFilter", directive_PythonInputFilter, NULL, OR_ALL, "Python input filter."), AP_INIT_TAKE12( "PythonOutputFilter", directive_PythonOutputFilter, NULL, OR_ALL, "Python output filter."), it is then possible to use the mod_python directives in a .htaccess file. Running the code this way appears to work for both input and output filters when specified in the .htaccess file without problems. So, does anyone know why this might be a bad idea? I can't really think of any reasons why it shouldn't be okay. If there is some confirmation that it all sounds reasonable, I'll create a JIRA issue for it to be a future enhancement.
Are there any conflicts when a directive appears in both places? If not, how do they cascade (does the .htaccess trump the one in the conf file, is it additive, does it respect virtual host or directory boundaries, etc...)?
