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?