Welcome! Log In Create A New Profile

Advanced

Re: Wha difference between HTTP_FILTER_MODULES and HTTP_AUX_FILTER_MODULES is it?

Maxim Dounin
November 23, 2010 01:16PM
Hello!

On Tue, Nov 23, 2010 at 09:22:58AM -0800, quan nexthop wrote:

> Hi Maxim:
>
> Thanks your response quickly.
> I try to development a filter module(string filter for request body),
> however, I found that
> 1) use HTTP_FILTER_MODULES to register, the module works well
> 2) use HTTP_AUX_FILTER_MODULES, it does not work.

So the question are: what your module does exactly (i.e. sources),
how do you add it (i.e. module ./config source) and how do you
test it (i.e. test case with expected output and output you got).
"Does not work" means basically nothing.

Assuming correct module code and ./config script the only
difference between adding filter to HTTP_AUX_FILTER_MODULES and
HTTP_FILTER_MODULES is that in later case your module will be able
to see output headers added by headers filter (i.e. add_header
directive). With something being incorrect things may vary widely.

> I wonder why there is two different behavior for the MODULE_NAME;
> I also check the config file of NGINX, there are several MODULE :
>
> if [ $HTTP = YES ]; then
> modules="$modules $HTTP_MODULES $HTTP_FILTER_MODULES \
> $HTTP_HEADERS_FILTER_MODULE \
> $HTTP_AUX_FILTER_MODULES \
> $HTTP_COPY_FILTER_MODULE \
> $HTTP_RANGE_BODY_FILTER_MODULE \
> $HTTP_NOT_MODIFIED_FILTER_MODULE \
> $HTTP_UPSTREAM_CACHE_MODELE"

It looks like you've already screwed up your nginx sources. There
shouldn't be anything like "HTTP_UPSTREAM_CACHE_MODELE" here.
Re-downloading/extracting nginx sources may be a good idea.

> What does it mean and when should it be used ?

There are lots of modules in nginx, and each of them needed for
something. Feel free to read docs and sources to find out what
exactly each module is needed for. These part of configure script
basically lines up various http modules and http filter modules.

And again: the only place in the filter chain where third party
modules is expected be installed is HTTP_AUX_FILTER_MODULES. You
should have really good reason to install your module anywhere
else, and if you do it - you do it at your own risk.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Wha difference between HTTP_FILTER_MODULES and HTTP_AUX_FILTER_MODULES is it?

nexthop November 23, 2010 11:06AM

Re: Wha difference between HTTP_FILTER_MODULES and HTTP_AUX_FILTER_MODULES is it?

Maxim Dounin November 23, 2010 12:00PM

Re: Wha difference between HTTP_FILTER_MODULES and HTTP_AUX_FILTER_MODULES is it?

nexthop November 23, 2010 12:28PM

Re: Wha difference between HTTP_FILTER_MODULES and HTTP_AUX_FILTER_MODULES is it?

Maxim Dounin November 23, 2010 01:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready