comparison src/http/ngx_http_variables.h @ 616:8214eaef3530 NGINX_0_9_6

nginx 0.9.6 *) Feature: the "map" directive supports regular expressions as value of the first parameter. *) Feature: $time_iso8601 access_log variable. Thanks to Michael Lustfield.
author Igor Sysoev <http://sysoev.ru>
date Mon, 21 Mar 2011 00:00:00 +0300
parents c456a023113c
children 83b58b182b76
comparison
equal deleted inserted replaced
615:02221dcea723 616:8214eaef3530
74 ngx_uint_t nvariables; 74 ngx_uint_t nvariables;
75 ngx_str_t name; 75 ngx_str_t name;
76 } ngx_http_regex_t; 76 } ngx_http_regex_t;
77 77
78 78
79 typedef struct {
80 ngx_http_regex_t *regex;
81 void *value;
82 } ngx_http_map_regex_t;
83
84
79 ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf, 85 ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
80 ngx_regex_compile_t *rc); 86 ngx_regex_compile_t *rc);
81 ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, 87 ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
82 ngx_str_t *s); 88 ngx_str_t *s);
83 89
84 #endif 90 #endif
91
92
93 typedef struct {
94 ngx_hash_combined_t hash;
95 #if (NGX_PCRE)
96 ngx_http_map_regex_t *regex;
97 ngx_uint_t nregex;
98 #endif
99 } ngx_http_map_t;
100
101
102 void *ngx_http_map_find(ngx_http_request_t *r, ngx_http_map_t *map,
103 ngx_uint_t key, u_char *text, size_t len, ngx_str_t *match);
85 104
86 105
87 ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf); 106 ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
88 ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf); 107 ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
89 108