Advise to develop a rights-control module
agentzh at gmail.com
Tue Sep 20 13:47:53 UTC 2011
On Tue, Sep 20, 2011 at 6:07 PM, Legrand Jérémie
<jeremie.legrand at atos.net> wrote:
> Thanks agentzh for your help.
> In fact you are right, my solution don't work properly because sending a response from my access phase handler does not end the request and NGINX keeps on processing it in the next phases (post access, content phases).
The following steps do not work for you?
1. set r->headers_out.status to whatever status code that you want for
2. call ngx_http_send_header to send out your response headers,
3. call ngx_http_output_filter to output your custom response,
4. and finally return NGX_HTTP_OK from within your access handler.
I don't see any reason to use a custom output filter here.
More information about the nginx-devel