Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http.c @ 492:98143f74eb3d NGINX_0_7_58
nginx 0.7.58
*) Feature: a "listen" directive of the mail proxy module supports IPv6.
*) Feature: the "image_filter_jpeg_quality" directive.
*) Feature: the "client_body_in_single_buffer" directive.
*) Feature: the $request_body variable.
*) Bugfix: in ngx_http_autoindex_module in file name links having a ":"
symbol in the name.
*) Bugfix: "make upgrade" procedure did not work; the bug had appeared
in 0.7.53.
Thanks to Denis F. Latypoff.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 18 May 2009 00:00:00 +0400 |
parents | 6484cbba0222 |
children | 0161f3197817 |
comparison
equal
deleted
inserted
replaced
491:bb2281a3edb6 | 492:98143f74eb3d |
---|---|
16 ngx_http_core_main_conf_t *cmcf); | 16 ngx_http_core_main_conf_t *cmcf); |
17 static ngx_int_t ngx_http_init_phase_handlers(ngx_conf_t *cf, | 17 static ngx_int_t ngx_http_init_phase_handlers(ngx_conf_t *cf, |
18 ngx_http_core_main_conf_t *cmcf); | 18 ngx_http_core_main_conf_t *cmcf); |
19 | 19 |
20 static ngx_int_t ngx_http_init_server_lists(ngx_conf_t *cf, | 20 static ngx_int_t ngx_http_init_server_lists(ngx_conf_t *cf, |
21 ngx_array_t *servers, ngx_array_t *in_ports); | 21 ngx_array_t *servers, ngx_array_t *ports); |
22 static ngx_int_t ngx_http_add_ports(ngx_conf_t *cf, | 22 static ngx_int_t ngx_http_add_ports(ngx_conf_t *cf, |
23 ngx_http_core_srv_conf_t *cscf, ngx_array_t *ports, | 23 ngx_http_core_srv_conf_t *cscf, ngx_array_t *ports, |
24 ngx_http_listen_t *listen); | 24 ngx_http_listen_t *listen); |
25 static ngx_int_t ngx_http_add_addresses(ngx_conf_t *cf, | 25 static ngx_int_t ngx_http_add_addresses(ngx_conf_t *cf, |
26 ngx_http_core_srv_conf_t *cscf, ngx_http_conf_port_t *port, | 26 ngx_http_core_srv_conf_t *cscf, ngx_http_conf_port_t *port, |
120 ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 120 ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
121 { | 121 { |
122 char *rv; | 122 char *rv; |
123 ngx_uint_t mi, m, s; | 123 ngx_uint_t mi, m, s; |
124 ngx_conf_t pcf; | 124 ngx_conf_t pcf; |
125 ngx_array_t in_ports; | 125 ngx_array_t ports; |
126 ngx_http_module_t *module; | 126 ngx_http_module_t *module; |
127 ngx_http_conf_ctx_t *ctx; | 127 ngx_http_conf_ctx_t *ctx; |
128 ngx_http_core_loc_conf_t *clcf; | 128 ngx_http_core_loc_conf_t *clcf; |
129 ngx_http_core_srv_conf_t **cscfp; | 129 ngx_http_core_srv_conf_t **cscfp; |
130 ngx_http_core_main_conf_t *cmcf; | 130 ngx_http_core_main_conf_t *cmcf; |
365 /* | 365 /* |
366 * create the lists of ports, addresses and server names | 366 * create the lists of ports, addresses and server names |
367 * to find quickly the server core module configuration at run-time | 367 * to find quickly the server core module configuration at run-time |
368 */ | 368 */ |
369 | 369 |
370 if (ngx_http_init_server_lists(cf, &cmcf->servers, &in_ports) != NGX_OK) { | 370 if (ngx_http_init_server_lists(cf, &cmcf->servers, &ports) != NGX_OK) { |
371 return NGX_CONF_ERROR; | 371 return NGX_CONF_ERROR; |
372 } | 372 } |
373 | 373 |
374 | 374 |
375 /* optimize the lists of ports, addresses and server names */ | 375 /* optimize the lists of ports, addresses and server names */ |
376 | 376 |
377 if (ngx_http_optimize_servers(cf, cmcf, &in_ports) != NGX_OK) { | 377 if (ngx_http_optimize_servers(cf, cmcf, &ports) != NGX_OK) { |
378 return NGX_CONF_ERROR; | 378 return NGX_CONF_ERROR; |
379 } | 379 } |
380 | 380 |
381 return NGX_CONF_OK; | 381 return NGX_CONF_OK; |
382 | 382 |
1178 | 1178 |
1179 if (p != port[i].port || sa->sa_family != port[i].family) { | 1179 if (p != port[i].port || sa->sa_family != port[i].family) { |
1180 continue; | 1180 continue; |
1181 } | 1181 } |
1182 | 1182 |
1183 /* a port is already in the in_port list */ | 1183 /* a port is already in the port list */ |
1184 | 1184 |
1185 return ngx_http_add_addresses(cf, cscf, &port[i], listen); | 1185 return ngx_http_add_addresses(cf, cscf, &port[i], listen); |
1186 } | 1186 } |
1187 | 1187 |
1188 /* add a port to the in_port list */ | 1188 /* add a port to the port list */ |
1189 | 1189 |
1190 port = ngx_array_push(ports); | 1190 port = ngx_array_push(ports); |
1191 if (port == NULL) { | 1191 if (port == NULL) { |
1192 return NGX_ERROR; | 1192 return NGX_ERROR; |
1193 } | 1193 } |
1277 } | 1277 } |
1278 | 1278 |
1279 | 1279 |
1280 /* | 1280 /* |
1281 * add the server address, the server names and the server core module | 1281 * add the server address, the server names and the server core module |
1282 * configurations to the port (in_port) | 1282 * configurations to the port list |
1283 */ | 1283 */ |
1284 | 1284 |
1285 static ngx_int_t | 1285 static ngx_int_t |
1286 ngx_http_add_address(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, | 1286 ngx_http_add_address(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf, |
1287 ngx_http_conf_port_t *port, ngx_http_listen_t *listen) | 1287 ngx_http_conf_port_t *port, ngx_http_listen_t *listen) |