diff src/http/ngx_http_core_module.h @ 1235:f8a40ccafb04

optimize regex location search
author Igor Sysoev <igor@sysoev.ru>
date Tue, 05 Jun 2007 06:44:08 +0000
parents d75676dfa1b0
children 5e4d3b5d7ad0
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -117,6 +117,9 @@ typedef struct {
      */
     ngx_array_t                locations;
 
+    unsigned                   regex_start:16;
+    unsigned                   wildcard:1;
+
     /* array of the ngx_http_listen_t, "listen" directive */
     ngx_array_t                listen;
 
@@ -138,8 +141,6 @@ typedef struct {
 
     ngx_flag_t                 optimize_server_names;
     ngx_flag_t                 ignore_invalid_headers;
-
-    ngx_uint_t                 wildcard;  /* unsigned  wildcard:1 */
 } ngx_http_core_srv_conf_t;
 
 
@@ -210,6 +211,8 @@ struct ngx_http_core_loc_conf_s {
     ngx_regex_t  *regex;
 #endif
 
+    unsigned      regex_start:16;
+
     unsigned      noname:1;   /* "if () {}" block */
 
     unsigned      exact_match:1;