Maxim Dounin mdounin at
Fri Dec 23 13:55:17 UTC 2011


On Thu, Dec 22, 2011 at 04:51:49PM -0500, J.Q. S. wrote:

> Could someone please explain what the ngx_http_set_ctx macro is doing and
> when it should be used?

It sets pointer to a module context structure within request.  It 
is expected to be used when module needs to preserve some 
information between different invocations within the same request.
It's commonly used by filter modules, see e.g. 

> A related question, are patches that add documentation to the code welcome?
> Or are we trying to keep comments out of the code?

Not really.  We prefer to comment only non-trivial aspects of the 

Maxim Dounin

More information about the nginx-devel mailing list