question about ngx_http_named_location

Vladimir Shebordaev vshebordaev at
Wed Aug 29 12:47:22 UTC 2012


2012/8/29 Anatoli Marinov <toli at>:
> Hello Mates,
> I am wondering why in ngx_http_named_location is used a segment of code that
> resets all modules contexts. I mean the line ngx_memzero(r->ctx, sizeof(void
> *) * ngx_http_max_module);.
> My opinion is that the module context should not be touched outside of the
> certain module. Is there a special reason for this patch? Is there a case
> which requires it?

I guess, this is due to that the named location is an internal
redirect, so the module contexts must be reset.

> Thanks in advance
> Anatoli Marinov

More information about the nginx-devel mailing list