Hi,

using mod_lua (httpd: 2.4.34) for rewriting my outgoing content by

LuaOutputFilter MyOutputFilter "/my/lib/lua/output-filter.lua" output_filter
SetOutputFilter MyOutputFilter

works great when the webserver returns content with status 200.
Sadly the output_filter-function is not getting called when httpd is redirecting content (301 or 302) or sends a 403.
Is that a bug in httpd/mod_lua or a wrong usage of mine?
The relevant config looks like:

LoadModule lua_module modules/mod_lua.so
LuaOutputFilter MyOutputFilter "/my/lib/lua/output-filter.lua" output_filter
SetOutputFilter MyOutputFilter
Redirect /test1.html /test1
RewriteEngine On
RewriteRule ^/test2.html$ /test2 [R=301,L]
RewriteRule ^/test3.html$ /test3 [R=302,L]
RewriteRule ^/test4.html$ - [F,L]

in /my/lib/lua/output-filter.lua I have:
function output_filter(r)
   r:err("Got called.")
end

Accesing http://127.0.0.1/test[N].html redirects or returns a 403, but the output_filter-function gets never called. (I also renamed 'output_filter' to 'MyOutputFilter' but that changed nothing.)

If I disable mod_lua, load mod_perl instead, and use PerlOutputFilterHandler for rewriting the output httpd will call that output filter at every status!
Any ideas what's going on here?

Best regards for any hints,
Frank

P.S.: Is there a reason why "AddOutputFilterByType MyOutputFilter text/html" does never work, while e.g. "AddOutputFilterByType DEFLATE text/html" does? Is the filter functionality of mod_lua broken?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to