# HG changeset patch # User Maxim Dounin # Date 1318714923 0 # Node ID c8f6248566aab8b71e30e901efe254cdc63e43e8 # Parent 9679fc14c063e903f6c886c6ca20ddf428655fa4 Added clearing of modules' contexts in ngx_http_named_location(). Patch by Yichun Zhang (agentzh). diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2546,6 +2546,9 @@ ngx_http_named_location(ngx_http_request r->content_handler = NULL; r->loc_conf = (*clcfp)->loc_conf; + /* clear the modules contexts */ + ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); + ngx_http_update_location_config(r); cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);