--add_module for filters?

Brian Moran bmoran at onehub.com
Sat Oct 4 09:18:44 MSD 2008

I'm trying to write a bare-bones body and header filter (just prints a 
debugging message for headers and the body), and found that when I put 
added it to the configuration with the --add-module configure directive, 
it was placed BEFORE all of the filters in the load order (especially 
the write filter). This meant that the http_write filter was called 
before my filter, and my filter was never getting called (http_write 
emits the output, assuming it's at the 'top' of the chain).

Moving my module to the bottom of the list,  after the 
http_not_modified_filter_module in the objs/ngx_modules.c file, I was 
able to get it to work as expected.

Besides editing objs/ngx_modules.c to manually place my module in the 
correct order, is there any way to add in a non-standard filter into the 
correct order in nginx's configure command?


-Brian Moran

More information about the nginx mailing list