body capture and redirect
Maxim Dounin
mdounin at mdounin.ru
Wed Sep 12 14:59:30 UTC 2018
Hello!
On Tue, Sep 11, 2018 at 12:28:52PM -0700, Dk Jack wrote:
> On your last suggestion...
>
> "In the request body filter you have to either return a fatal error, or
> raise some internal flag for your processing, and then
> act on this flag after the body is fully read."
>
> How can I be certain when my body is fully read? Currently, when my body
> filter is invoked,
> I am walking the chain of buffers and saving it to a temporary buffer to
> perform my lookup.
> That is why I am little confused by your statement.Thanks for all your help.
By writing "act on this flag after the body is fully read" I mean
doing something only when the request body reading is complete, and
the post_handler was called by the request body reading code to
indicate this and resume request processing.
Also, just to make things more clear: a request body filter is
only allowed to return NGX_OK or an NGX_HTTP_* error. Trying to
return anything else will cause problems.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx-devel
mailing list