You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2021/07/25 16:36:06 UTC
[Bug 65463] New: AddOutputFilterByType does not work for
user-defined filters
https://bz.apache.org/bugzilla/show_bug.cgi?id=65463
Bug ID: 65463
Summary: AddOutputFilterByType does not work for user-defined
filters
Product: Apache httpd-2
Version: 2.4-HEAD
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: mod_filter
Assignee: bugs@httpd.apache.org
Reporter: sebb@apache.org
Target Milestone: ---
https://httpd.apache.org/docs/2.4/mod/mod_filter.html#addoutputfilterbytype
does not work with LuaFilter or mod_ext_filter.
Until such time as it can be fixed, perhaps the documentation can be updated to
warn users accordingly
See also:
https://lists.apache.org/thread.html/ra553cc15c1830bdd3b28999fa0ee102c41020e6dc7b6e1beb2fd051d%40%3Cusers.httpd.apache.org%3E
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 65463] AddOutputFilterByType does not work for user-defined filters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65463
--- Comment #1 from Rich Bowen <rb...@apache.org> ---
Documented the limitation in the AddOutputFilterByType directive docs.
The underlying issue is that mod_filter's filter_bytype1() creates
an internal wrapper filter with a "BYTYPE:" prefix on the name
(e.g. "BYTYPE:myfilter"). When the harness calls the provider's
filter function, the modified name is passed through. Standard
compiled-in filters like DEFLATE don't care about the name, but
mod_ext_filter and mod_lua's LuaOutputFilter look up their
configuration by filter name and fail when they see the prefixed
version.
Added a warning note pointing users to FilterDeclare/FilterProvider
with a %{CONTENT_TYPE} expression as a workaround.
The code bug remains — the BYTYPE: prefix mangling should ideally
be transparent to provider filters.
Docs fixed in r1933776 (trunk), r1933777 (2.4).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 65463] AddOutputFilterByType does not work for user-defined filters
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65463
--- Comment #2 from abernal <ab...@apache.org> ---
The underlying code bug is fixed: f->frec now points to the provider's own
filter_rec while mod_filter calls into it, in filter_init() and
filter_harness(), instead of staying mod_filter's wrapper filter_rec. A
provider that looks up its own configuration by f->frec->name, like
mod_ext_filter or LuaOutputFilter, now finds it under AddOutputFilterByType and
FilterChain/FilterProvider alike.
Reproduced on trunk: AddOutputFilterByType with mod_ext_filter gave AH01459 and
a 500; with a LuaOutputFilter it silently skipped the filter. Both now apply
the filter correctly, with the same response as calling the provider directly.
Proposed fix, with tests: https://github.com/apache/httpd/pull/875
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org