Welcome! Log In Create A New Profile

Advanced

NGX_DONE from body_filter, and what's next?

bbm
September 17, 2009 07:22AM
Hi,
I'm writing a filter which do something like this:

1. collect incoming data from chains
2. enqueues some asynchronous connections using nginx event mechanism
3. returns NGX_DONE

How should I finalize work of this filter from callback?

Calling next_body_filter(request, result) from callback doesn't work, probably because of NGX_DONE returned from body_filter.
Calling next_body_filter and ngx_http_finalize_request(r, rc) seems to work (site is served, client can see the result), but it causes segfaults in strange places (outside my filter). Probably ngx_http_finalize_request must not be used in that way.

Does anybody know how to finalize work of filter which returned NGX_DONE?
Is it allowed to return NGX_DONE from filter?
Subject Author Posted

NGX_DONE from body_filter, and what's next?

bbm September 17, 2009 07:22AM

Re: NGX_DONE from body_filter, and what's next?

bbm September 18, 2009 05:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 101
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready