Mercurial > hg > nginx
comparison src/http/ngx_http.c @ 1395:bf5b86d5f00e stable-0.5
r1354 merge:
named location
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 14 Aug 2007 20:02:09 +0000 |
parents | 5e4d3b5d7ad0 |
children | 9b10ba85b249 |
comparison
equal
deleted
inserted
replaced
1384:6485121a080d | 1395:bf5b86d5f00e |
---|---|
400 | 400 |
401 *cf = pcf; | 401 *cf = pcf; |
402 | 402 |
403 | 403 |
404 cmcf->phase_engine.server_rewrite_index = (ngx_uint_t) -1; | 404 cmcf->phase_engine.server_rewrite_index = (ngx_uint_t) -1; |
405 cmcf->phase_engine.location_rewrite_index = (ngx_uint_t) -1; | |
405 find_config_index = 0; | 406 find_config_index = 0; |
406 use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0; | 407 use_rewrite = cmcf->phases[NGX_HTTP_REWRITE_PHASE].handlers.nelts ? 1 : 0; |
407 use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0; | 408 use_access = cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers.nelts ? 1 : 0; |
408 | 409 |
409 n = use_rewrite + use_access + 1; /* find config phase */ | 410 n = use_rewrite + use_access + 1; /* find config phase */ |
440 ph->checker = ngx_http_core_find_config_phase; | 441 ph->checker = ngx_http_core_find_config_phase; |
441 n++; | 442 n++; |
442 ph++; | 443 ph++; |
443 | 444 |
444 continue; | 445 continue; |
446 | |
447 case NGX_HTTP_REWRITE_PHASE: | |
448 if (cmcf->phase_engine.location_rewrite_index == (ngx_uint_t) -1) { | |
449 cmcf->phase_engine.location_rewrite_index = n; | |
450 } | |
451 checker = ngx_http_core_generic_phase; | |
452 | |
453 break; | |
445 | 454 |
446 case NGX_HTTP_POST_REWRITE_PHASE: | 455 case NGX_HTTP_POST_REWRITE_PHASE: |
447 if (use_rewrite) { | 456 if (use_rewrite) { |
448 ph->checker = ngx_http_core_post_rewrite_phase; | 457 ph->checker = ngx_http_core_post_rewrite_phase; |
449 ph->next = find_config_index; | 458 ph->next = find_config_index; |