BIG requests/responses to POST and post_handler return value

agentzh agentzh at
Wed Feb 23 06:32:31 MSK 2011

On Tue, Feb 22, 2011 at 9:51 PM, Antoine BONAVITA
<antoine_bonavita at> wrote:
> Got it. Why the same pattern was not used for the body handler ? Using one
> pattern for request handler and another for body handler is definitely
> misleading and wannabe module developers like me are likely to fall in this
> trap.

Well, just to mind you, the rewrite handler, access handler, and body
handler all use its own convention of return values and they're
different in one way or another ;)

Besides, the specific meaning may change without notice because Igor
Sysoev tends to change his mind :)

If you'd call such things "traps", then I'd say there's tons of them
in the core.

Reading request bodies can be more complicated in a rewrite/access
phase handler (as compared to the content handler in your example)
because the protocol there is even more complicated.

> I definitely will. The tricky part is that those problems appear only in very
> specific situations (big BODY in and out). Honestly, I ran into this bug almost
> "by luck".

No, you definitely do not have to do things by luck because you do
have access to the complete source code. When in doubt, go reading the

If you do rely on luck while developing nginx modules, then I'd bet
that you'll quickly go out of luck and it's very likely you have
broken things on your side already :)

Relying on mail list mails or blog posts is not recommended either,
because there's so many important details that could be easily missed
intentionally or unintentionally in such media.


More information about the nginx-devel mailing list