Mercurial > hg > nginx-quic
comparison src/http/ngx_http_core_module.h @ 485:4ebe09b07e30 release-0.1.17
nginx-0.1.17-RELEASE import
*) Change: the ngx_http_rewrite_module was rewritten from the scratch.
Now it is possible to redirect, to return the error codes, to check
the variables and referrers. The directives can be used inside
locations. The redirect directive was canceled.
*) Feature: the ngx_http_geo_module.
*) Feature: the proxy_set_x_var and fastcgi_set_var directives.
*) Bugfix: the location configuration with "=" modifier may be used in
another location.
*) Bugfix: the correct content type was set only for requests that use
small caps letters in extension.
*) Bugfix: if the proxy_pass or fastcgi_pass directives were set in the
location, and access was denied, and the error was redirected to a
static page, then the segmentation fault occurred.
*) Bugfix: if in a proxied "Location" header was a relative URL, then a
host name and a slash were added to them; the bug had appeared in
0.1.14.
*) Bugfix: the system error message was not logged on Linux.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 03 Feb 2005 19:33:37 +0000 |
parents | c52408583801 |
children | 45a460f82aec |
comparison
equal
deleted
inserted
replaced
484:60452f1c0c62 | 485:4ebe09b07e30 |
---|---|
35 NGX_HTTP_LAST_PHASE | 35 NGX_HTTP_LAST_PHASE |
36 } ngx_http_phases; | 36 } ngx_http_phases; |
37 | 37 |
38 | 38 |
39 typedef struct { | 39 typedef struct { |
40 ngx_uint_t value; | |
41 ngx_str_t text; | |
42 } ngx_http_variable_value_t; | |
43 | |
44 | |
45 typedef struct ngx_http_variable_s ngx_http_variable_t; | |
46 | |
47 typedef ngx_http_variable_value_t | |
48 *(*ngx_http_get_variable_pt) (ngx_http_request_t *r, void *var); | |
49 | |
50 | |
51 struct ngx_http_variable_s { | |
52 ngx_str_t name; | |
53 ngx_uint_t index; | |
54 ngx_http_get_variable_pt handler; | |
55 void *data; | |
56 ngx_uint_t uses; | |
57 }; | |
58 | |
59 | |
60 typedef struct { | |
40 ngx_array_t handlers; | 61 ngx_array_t handlers; |
41 ngx_int_t type; /* NGX_OK, NGX_DECLINED */ | 62 ngx_int_t type; /* NGX_OK, NGX_DECLINED */ |
42 } ngx_http_phase_t; | 63 } ngx_http_phase_t; |
43 | 64 |
44 | 65 |
45 typedef struct { | 66 typedef struct { |
46 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ | 67 ngx_array_t servers; /* ngx_http_core_srv_conf_t */ |
47 | 68 |
48 ngx_http_phase_t phases[NGX_HTTP_LAST_PHASE]; | 69 ngx_http_phase_t phases[NGX_HTTP_LAST_PHASE]; |
49 ngx_array_t index_handlers; | 70 ngx_array_t index_handlers; |
50 | 71 |
51 ngx_uint_t server_names_hash; | 72 ngx_uint_t server_names_hash; |
52 ngx_uint_t server_names_hash_threshold; | 73 ngx_uint_t server_names_hash_threshold; |
53 | 74 |
54 size_t max_server_name_len; | 75 size_t max_server_name_len; |
76 | |
77 ngx_array_t variables; /* ngx_http_variable_t */ | |
55 } ngx_http_core_main_conf_t; | 78 } ngx_http_core_main_conf_t; |
56 | 79 |
57 | 80 |
58 typedef struct { | 81 typedef struct { |
59 /* | 82 /* |
60 * array of ngx_http_core_loc_conf_t, used in the translation handler | 83 * array of the ngx_http_core_loc_conf_t, |
61 * and in the merge phase | 84 * used in the translation handler and in the merge phase |
62 */ | 85 */ |
63 ngx_array_t locations; | 86 ngx_array_t locations; |
64 | 87 |
65 /* "listen", array of ngx_http_listen_t */ | 88 /* array of the ngx_http_listen_t, "listen" directive */ |
66 ngx_array_t listen; | 89 ngx_array_t listen; |
67 | 90 |
68 /* "server_name", array of ngx_http_server_name_t */ | 91 /* array of the ngx_http_server_name_t, "server_name" directive */ |
69 ngx_array_t server_names; | 92 ngx_array_t server_names; |
70 | 93 |
71 /* server ctx */ | 94 /* server ctx */ |
72 ngx_http_conf_ctx_t *ctx; | 95 ngx_http_conf_ctx_t *ctx; |
73 | 96 |
156 | 179 |
157 #if (NGX_PCRE) | 180 #if (NGX_PCRE) |
158 ngx_regex_t *regex; | 181 ngx_regex_t *regex; |
159 #endif | 182 #endif |
160 | 183 |
184 unsigned noname:1; /* "if () {}" block */ | |
185 | |
161 unsigned exact_match:1; | 186 unsigned exact_match:1; |
162 unsigned noregex:1; | 187 unsigned noregex:1; |
163 | 188 |
164 unsigned auto_redirect:1; | 189 unsigned auto_redirect:1; |
165 unsigned alias:1; | 190 unsigned alias:1; |
203 | 228 |
204 ngx_http_cache_hash_t *open_files; | 229 ngx_http_cache_hash_t *open_files; |
205 | 230 |
206 ngx_log_t *err_log; | 231 ngx_log_t *err_log; |
207 | 232 |
233 #if 0 | |
208 ngx_http_core_loc_conf_t *prev_location; | 234 ngx_http_core_loc_conf_t *prev_location; |
235 #endif | |
209 }; | 236 }; |
237 | |
210 | 238 |
211 | 239 |
212 extern ngx_http_module_t ngx_http_core_module_ctx; | 240 extern ngx_http_module_t ngx_http_core_module_ctx; |
213 extern ngx_module_t ngx_http_core_module; | 241 extern ngx_module_t ngx_http_core_module; |
214 | 242 |
215 extern int ngx_http_max_module; | 243 extern ngx_uint_t ngx_http_max_module; |
216 | 244 |
217 | 245 |
218 | 246 |
219 ngx_int_t ngx_http_find_location_config(ngx_http_request_t *r); | 247 ngx_int_t ngx_http_find_location_config(ngx_http_request_t *r); |
220 ngx_int_t ngx_http_core_translate_handler(ngx_http_request_t *r); | |
221 | 248 |
222 ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r); | 249 ngx_int_t ngx_http_set_content_type(ngx_http_request_t *r); |
223 ngx_int_t ngx_http_set_exten(ngx_http_request_t *r); | 250 ngx_int_t ngx_http_set_exten(ngx_http_request_t *r); |
224 | 251 |
225 ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r, | 252 ngx_int_t ngx_http_internal_redirect(ngx_http_request_t *r, |
226 ngx_str_t *uri, ngx_str_t *args); | 253 ngx_str_t *uri, ngx_str_t *args); |
254 | |
255 ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf); | |
256 ngx_http_variable_value_t *ngx_http_get_variable(ngx_http_request_t *r, | |
257 ngx_uint_t index); | |
227 | 258 |
228 | 259 |
229 typedef ngx_int_t (*ngx_http_output_header_filter_pt)(ngx_http_request_t *r); | 260 typedef ngx_int_t (*ngx_http_output_header_filter_pt)(ngx_http_request_t *r); |
230 typedef ngx_int_t (*ngx_http_output_body_filter_pt) | 261 typedef ngx_int_t (*ngx_http_output_body_filter_pt) |
231 (ngx_http_request_t *r, ngx_chain_t *chain); | 262 (ngx_http_request_t *r, ngx_chain_t *chain); |