Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.c @ 1396:ec4d58ab30ea stable-0.5
r1387 merge:
fix building by bcc without PCRE
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 14 Aug 2007 20:03:00 +0000 |
parents | bf5b86d5f00e |
children | 1a1fe29fdb17 |
comparison
equal
deleted
inserted
replaced
1395:bf5b86d5f00e | 1396:ec4d58ab30ea |
---|---|
931 static ngx_int_t | 931 static ngx_int_t |
932 ngx_http_core_find_location(ngx_http_request_t *r, | 932 ngx_http_core_find_location(ngx_http_request_t *r, |
933 ngx_array_t *locations, ngx_uint_t regex_start, size_t len) | 933 ngx_array_t *locations, ngx_uint_t regex_start, size_t len) |
934 { | 934 { |
935 ngx_int_t n, rc; | 935 ngx_int_t n, rc; |
936 ngx_uint_t i, found, noregex; | 936 ngx_uint_t i, found; |
937 ngx_http_core_loc_conf_t *clcf, **clcfp; | 937 ngx_http_core_loc_conf_t *clcf, **clcfp; |
938 #if (NGX_PCRE) | |
939 ngx_uint_t noregex; | |
940 #endif | |
938 | 941 |
939 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 942 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
940 "find location for \"%V\"", &r->uri); | 943 "find location for \"%V\"", &r->uri); |
941 | 944 |
942 found = 0; | 945 found = 0; |
946 #if (NGX_PCRE) | |
943 noregex = 0; | 947 noregex = 0; |
948 #endif | |
944 | 949 |
945 clcfp = locations->elts; | 950 clcfp = locations->elts; |
946 for (i = 0; i < locations->nelts; i++) { | 951 for (i = 0; i < locations->nelts; i++) { |
947 | 952 |
948 if (clcfp[i]->noname | 953 if (clcfp[i]->noname |
996 if (len > clcfp[i]->name.len) { | 1001 if (len > clcfp[i]->name.len) { |
997 /* the previous match is longer */ | 1002 /* the previous match is longer */ |
998 break; | 1003 break; |
999 } | 1004 } |
1000 | 1005 |
1006 found = 1; | |
1007 | |
1001 r->loc_conf = clcfp[i]->loc_conf; | 1008 r->loc_conf = clcfp[i]->loc_conf; |
1009 #if (NGX_PCRE) | |
1002 noregex = clcfp[i]->noregex; | 1010 noregex = clcfp[i]->noregex; |
1003 found = 1; | 1011 #endif |
1004 } | 1012 } |
1005 } | 1013 } |
1006 | 1014 |
1007 if (found) { | 1015 if (found) { |
1008 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 1016 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |