<div dir="ltr"><div>Hi Maxim, thanks for you answer. I have the following scenario, I want to finalize the request for example with NGX_ERROR, let's say in REWRITE phase, how could I make the request pass through the filters, I was thinking that something like this would work, but it isn't.<br></div><div><br></div><div>    ngx_chain_t out;<br>    ngx_http_send_header(r);<br>    rc = ngx_http_output_filter(r, &out);<br>    ngx_http_finalize_request(r, NGX_ERROR);</div><div><br></div><div>Thanks,</div><div>Antonio<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno ven 17 ago 2018 alle ore 01:28 Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
On Thu, Aug 16, 2018 at 12:36:05AM +0200, Antonio Nappa wrote:<br>
<br>
> I have two modules loaded and it looks like when I terminate a request from<br>
> one module by calling ngx_http_output_filter the body filter in the other<br>
> module does not get called. The module with the body filter is loaded first<br>
> in the config (IMO it shouldn't matter). Do you have any suggestion on how<br>
> I can make the body filter called?<br>
<br>
Make sure you've wrote the config file of your module properly.  <br>
In particular, config file for a typical body filter should look <br>
like:<br>
<br>
ngx_addon_name="ngx_http_foo_filter_module"<br>
<br>
ngx_module_type=HTTP_AUX_FILTER<br>
ngx_module_name=ngx_http_foo_filter_module<br>
ngx_module_incs=<br>
ngx_module_deps=<br>
ngx_module_srcs=$ngx_addon_dir/ngx_http_foo_filter_module.c<br>
ngx_module_libs=<br>
ngx_module_order=<br>
<br>
. auto/module<br>
<br>
Trying to configure a filter module with ngx_module_type=HTTP <br>
won't work.<br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/" rel="noreferrer" target="_blank">http://mdounin.ru/</a><br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org" target="_blank">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</blockquote></div>