comparison src/http/modules/ngx_http_rewrite_module.c @ 378:820f6378fc00 NGINX_0_7_1

nginx 0.7.1 *) Change: now locations are searched in a tree. *) Change: the "optimize_server_names" directive was canceled due to the "server_name_in_redirect" directive introduction. *) Change: some long deprecated directives are not supported anymore. *) Change: the "none" parameter in the "ssl_session_cache" directive; now this is default parameter. Thanks to Rob Mueller. *) Bugfix: worker processes might not catch reconfiguration and log rotation signals. *) Bugfix: nginx could not be built on latest Fedora 9 Linux. Thanks to Roxis.
author Igor Sysoev <http://sysoev.ru>
date Mon, 26 May 2008 00:00:00 +0400
parents 10cc350ed8a1
children 984bb0b1399b
comparison
equal deleted inserted replaced
377:5d98007adb5f 378:820f6378fc00
522 u_char *elts; 522 u_char *elts;
523 ngx_uint_t i; 523 ngx_uint_t i;
524 ngx_conf_t save; 524 ngx_conf_t save;
525 ngx_http_module_t *module; 525 ngx_http_module_t *module;
526 ngx_http_conf_ctx_t *ctx, *pctx; 526 ngx_http_conf_ctx_t *ctx, *pctx;
527 ngx_http_core_loc_conf_t *clcf, *pclcf, **clcfp; 527 ngx_http_core_loc_conf_t *clcf, *pclcf;
528 ngx_http_script_if_code_t *if_code; 528 ngx_http_script_if_code_t *if_code;
529 ngx_http_rewrite_loc_conf_t *nlcf; 529 ngx_http_rewrite_loc_conf_t *nlcf;
530 530
531 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t)); 531 ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
532 if (ctx == NULL) { 532 if (ctx == NULL) {
565 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; 565 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index];
566 clcf->loc_conf = ctx->loc_conf; 566 clcf->loc_conf = ctx->loc_conf;
567 clcf->name = pclcf->name; 567 clcf->name = pclcf->name;
568 clcf->noname = 1; 568 clcf->noname = 1;
569 569
570 if (pclcf->locations == NULL) { 570 if (ngx_http_add_location(cf, &pclcf->locations, clcf) != NGX_OK) {
571 pclcf->locations = ngx_array_create(cf->pool, 2, sizeof(void *)); 571 return NGX_CONF_ERROR;
572 if (pclcf->locations == NULL) { 572 }
573 return NGX_CONF_ERROR;
574 }
575 }
576
577 clcfp = ngx_array_push(pclcf->locations);
578 if (clcfp == NULL) {
579 return NGX_CONF_ERROR;
580 }
581
582 *clcfp = clcf;
583
584 573
585 if (ngx_http_rewrite_if_condition(cf, lcf) != NGX_CONF_OK) { 574 if (ngx_http_rewrite_if_condition(cf, lcf) != NGX_CONF_OK) {
586 return NGX_CONF_ERROR; 575 return NGX_CONF_ERROR;
587 } 576 }
588 577