Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_core_module.h @ 578:f3a9e57d2e17
Merge with current.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Mar 2010 21:27:17 +0300 |
parents | 2da4537168f8 |
children | be4f34123024 |
comparison
equal
deleted
inserted
replaced
539:5f4de8cf0d9d | 578:f3a9e57d2e17 |
---|---|
41 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; | 41 typedef struct ngx_http_location_tree_node_s ngx_http_location_tree_node_t; |
42 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; | 42 typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t; |
43 | 43 |
44 | 44 |
45 typedef struct { | 45 typedef struct { |
46 union { | |
47 struct sockaddr sockaddr; | |
48 struct sockaddr_in sockaddr_in; | |
49 #if (NGX_HAVE_INET6) | |
50 struct sockaddr_in6 sockaddr_in6; | |
51 #endif | |
52 #if (NGX_HAVE_UNIX_DOMAIN) | |
53 struct sockaddr_un sockaddr_un; | |
54 #endif | |
55 u_char sockaddr_data[NGX_SOCKADDRLEN]; | |
56 } u; | |
57 | |
58 socklen_t socklen; | |
59 | |
60 unsigned set:1; | |
46 unsigned default_server:1; | 61 unsigned default_server:1; |
47 unsigned bind:1; | 62 unsigned bind:1; |
48 unsigned wildcard:1; | 63 unsigned wildcard:1; |
49 #if (NGX_HTTP_SSL) | 64 #if (NGX_HTTP_SSL) |
50 unsigned ssl:1; | 65 unsigned ssl:1; |
63 #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) | 78 #if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT) |
64 ngx_uint_t deferred_accept; | 79 ngx_uint_t deferred_accept; |
65 #endif | 80 #endif |
66 | 81 |
67 u_char addr[NGX_SOCKADDR_STRLEN + 1]; | 82 u_char addr[NGX_SOCKADDR_STRLEN + 1]; |
68 } ngx_http_listen_conf_t; | 83 } ngx_http_listen_opt_t; |
69 | |
70 | |
71 typedef struct { | |
72 u_char sockaddr[NGX_SOCKADDRLEN]; | |
73 socklen_t socklen; | |
74 | |
75 u_char *file_name; | |
76 ngx_uint_t line; | |
77 | |
78 ngx_http_listen_conf_t conf; | |
79 } ngx_http_listen_t; | |
80 | 84 |
81 | 85 |
82 typedef enum { | 86 typedef enum { |
83 NGX_HTTP_POST_READ_PHASE = 0, | 87 NGX_HTTP_POST_READ_PHASE = 0, |
84 | 88 |
131 ngx_hash_t headers_in_hash; | 135 ngx_hash_t headers_in_hash; |
132 | 136 |
133 ngx_hash_t variables_hash; | 137 ngx_hash_t variables_hash; |
134 | 138 |
135 ngx_array_t variables; /* ngx_http_variable_t */ | 139 ngx_array_t variables; /* ngx_http_variable_t */ |
140 ngx_uint_t ncaptures; | |
136 | 141 |
137 ngx_uint_t server_names_hash_max_size; | 142 ngx_uint_t server_names_hash_max_size; |
138 ngx_uint_t server_names_hash_bucket_size; | 143 ngx_uint_t server_names_hash_bucket_size; |
139 | 144 |
140 ngx_uint_t variables_hash_max_size; | 145 ngx_uint_t variables_hash_max_size; |
141 ngx_uint_t variables_hash_bucket_size; | 146 ngx_uint_t variables_hash_bucket_size; |
142 | 147 |
143 ngx_hash_keys_arrays_t *variables_keys; | 148 ngx_hash_keys_arrays_t *variables_keys; |
144 | 149 |
150 ngx_array_t *ports; | |
151 | |
145 ngx_uint_t try_files; /* unsigned try_files:1 */ | 152 ngx_uint_t try_files; /* unsigned try_files:1 */ |
146 | 153 |
147 ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1]; | 154 ngx_http_phase_t phases[NGX_HTTP_LOG_PHASE + 1]; |
148 } ngx_http_core_main_conf_t; | 155 } ngx_http_core_main_conf_t; |
149 | 156 |
150 | 157 |
151 typedef struct { | 158 typedef struct { |
152 /* array of the ngx_http_listen_t, "listen" directive */ | |
153 ngx_array_t listen; | |
154 | |
155 /* array of the ngx_http_server_name_t, "server_name" directive */ | 159 /* array of the ngx_http_server_name_t, "server_name" directive */ |
156 ngx_array_t server_names; | 160 ngx_array_t server_names; |
157 | 161 |
158 /* server ctx */ | 162 /* server ctx */ |
159 ngx_http_conf_ctx_t *ctx; | 163 ngx_http_conf_ctx_t *ctx; |
170 | 174 |
171 ngx_flag_t ignore_invalid_headers; | 175 ngx_flag_t ignore_invalid_headers; |
172 ngx_flag_t merge_slashes; | 176 ngx_flag_t merge_slashes; |
173 ngx_flag_t underscores_in_headers; | 177 ngx_flag_t underscores_in_headers; |
174 | 178 |
179 unsigned listen:1; | |
180 #if (NGX_PCRE) | |
181 unsigned captures:1; | |
182 #endif | |
183 | |
175 ngx_http_core_loc_conf_t **named_locations; | 184 ngx_http_core_loc_conf_t **named_locations; |
176 } ngx_http_core_srv_conf_t; | 185 } ngx_http_core_srv_conf_t; |
177 | 186 |
178 | 187 |
179 /* list of structures to find core_srv_conf quickly at run time */ | 188 /* list of structures to find core_srv_conf quickly at run time */ |
180 | 189 |
181 | 190 |
182 typedef struct { | 191 typedef struct { |
183 /* the default server configuration for this address:port */ | 192 /* the default server configuration for this address:port */ |
184 ngx_http_core_srv_conf_t *core_srv_conf; | 193 ngx_http_core_srv_conf_t *default_server; |
185 | 194 |
186 ngx_http_virtual_names_t *virtual_names; | 195 ngx_http_virtual_names_t *virtual_names; |
187 | 196 |
188 #if (NGX_HTTP_SSL) | 197 #if (NGX_HTTP_SSL) |
189 ngx_uint_t ssl; /* unsigned ssl:1; */ | 198 ngx_uint_t ssl; /* unsigned ssl:1; */ |
220 ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ | 229 ngx_array_t addrs; /* array of ngx_http_conf_addr_t */ |
221 } ngx_http_conf_port_t; | 230 } ngx_http_conf_port_t; |
222 | 231 |
223 | 232 |
224 typedef struct { | 233 typedef struct { |
225 struct sockaddr *sockaddr; | 234 ngx_http_listen_opt_t opt; |
226 socklen_t socklen; | |
227 | 235 |
228 ngx_hash_t hash; | 236 ngx_hash_t hash; |
229 ngx_hash_wildcard_t *wc_head; | 237 ngx_hash_wildcard_t *wc_head; |
230 ngx_hash_wildcard_t *wc_tail; | 238 ngx_hash_wildcard_t *wc_tail; |
231 | 239 |
232 ngx_array_t names; /* array of ngx_http_server_name_t */ | |
233 | |
234 #if (NGX_PCRE) | 240 #if (NGX_PCRE) |
235 ngx_uint_t nregex; | 241 ngx_uint_t nregex; |
236 ngx_http_server_name_t *regex; | 242 ngx_http_server_name_t *regex; |
237 #endif | 243 #endif |
238 | 244 |
239 /* the default server configuration for this address:port */ | 245 /* the default server configuration for this address:port */ |
240 ngx_http_core_srv_conf_t *core_srv_conf; | 246 ngx_http_core_srv_conf_t *default_server; |
241 | 247 ngx_array_t servers; /* array of ngx_http_core_srv_conf_t */ |
242 unsigned default_server:1; | |
243 unsigned bind:1; | |
244 unsigned wildcard:1; | |
245 #if (NGX_HTTP_SSL) | |
246 unsigned ssl:1; | |
247 #endif | |
248 | |
249 ngx_http_listen_conf_t *listen_conf; | |
250 } ngx_http_conf_addr_t; | 248 } ngx_http_conf_addr_t; |
251 | 249 |
252 | 250 |
253 struct ngx_http_server_name_s { | 251 struct ngx_http_server_name_s { |
254 #if (NGX_PCRE) | 252 #if (NGX_PCRE) |
255 ngx_regex_t *regex; | 253 ngx_http_regex_t *regex; |
256 ngx_uint_t captures; /* unsigned captures:1; */ | 254 #endif |
257 #endif | 255 ngx_http_core_srv_conf_t *server; /* virtual name server conf */ |
258 ngx_http_core_srv_conf_t *core_srv_conf; /* virtual name server conf */ | |
259 ngx_str_t name; | 256 ngx_str_t name; |
260 }; | 257 }; |
261 | 258 |
262 | 259 |
263 typedef struct { | 260 typedef struct { |
280 | 277 |
281 struct ngx_http_core_loc_conf_s { | 278 struct ngx_http_core_loc_conf_s { |
282 ngx_str_t name; /* location name */ | 279 ngx_str_t name; /* location name */ |
283 | 280 |
284 #if (NGX_PCRE) | 281 #if (NGX_PCRE) |
285 ngx_regex_t *regex; | 282 ngx_http_regex_t *regex; |
286 | |
287 unsigned captures:1; | |
288 #endif | 283 #endif |
289 | 284 |
290 unsigned noname:1; /* "if () {}" block or limit_except */ | 285 unsigned noname:1; /* "if () {}" block or limit_except */ |
291 unsigned named:1; | 286 unsigned named:1; |
292 | 287 |
330 size_t send_lowat; /* send_lowat */ | 325 size_t send_lowat; /* send_lowat */ |
331 size_t postpone_output; /* postpone_output */ | 326 size_t postpone_output; /* postpone_output */ |
332 size_t limit_rate; /* limit_rate */ | 327 size_t limit_rate; /* limit_rate */ |
333 size_t limit_rate_after; /* limit_rate_after */ | 328 size_t limit_rate_after; /* limit_rate_after */ |
334 size_t sendfile_max_chunk; /* sendfile_max_chunk */ | 329 size_t sendfile_max_chunk; /* sendfile_max_chunk */ |
330 size_t read_ahead; /* read_ahead */ | |
335 | 331 |
336 ngx_msec_t client_body_timeout; /* client_body_timeout */ | 332 ngx_msec_t client_body_timeout; /* client_body_timeout */ |
337 ngx_msec_t send_timeout; /* send_timeout */ | 333 ngx_msec_t send_timeout; /* send_timeout */ |
338 ngx_msec_t keepalive_timeout; /* keepalive_timeout */ | 334 ngx_msec_t keepalive_timeout; /* keepalive_timeout */ |
339 ngx_msec_t lingering_time; /* lingering_time */ | 335 ngx_msec_t lingering_time; /* lingering_time */ |