Welcome! Log In Create A New Profile

Advanced

Re: ngx_http_set_ctx

Maxim Dounin
December 23, 2011 08:56AM
Hello!

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.
src/http/modules/ngx_http_sub_filter_module.c.

> 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
code.

Maxim Dounin

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

ngx_http_set_ctx

J.Q. S. 2771 December 22, 2011 04:52PM

Re: ngx_http_set_ctx

Maxim Dounin 956 December 23, 2011 08:56AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 146
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready