comparison src/http/ngx_http.c @ 380:bc21d9cd9c54 NGINX_0_7_2

nginx 0.7.2 *) Feature: now nginx supports EDH key exchange ciphers. *) Feature: the "ssl_dhparam" directive. *) Feature: the $ssl_client_cert variable. Thanks to Manlio Perillo. *) Bugfix: after changing URI via a "rewrite" directive nginx did not search a new location; bug appeared in 0.7.1. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built without PCRE library; bug appeared in 0.7.1. *) Bugfix: when a request to a directory was redirected with the slash added, nginx dropped a query string from the original request.
author Igor Sysoev <http://sysoev.ru>
date Mon, 16 Jun 2008 00:00:00 +0400
parents 820f6378fc00
children 984bb0b1399b
comparison
equal deleted inserted replaced
379:9d9dad60269f 380:bc21d9cd9c54
1022 q = ngx_queue_middle(locations); 1022 q = ngx_queue_middle(locations);
1023 1023
1024 lq = (ngx_http_location_queue_t *) q; 1024 lq = (ngx_http_location_queue_t *) q;
1025 len = lq->name->len - prefix; 1025 len = lq->name->len - prefix;
1026 1026
1027 node = ngx_pcalloc(cf->pool, 1027 node = ngx_palloc_aligned(cf->pool,
1028 offsetof(ngx_http_location_tree_node_t, name) + len); 1028 offsetof(ngx_http_location_tree_node_t, name) + len);
1029 if (node == NULL) { 1029 if (node == NULL) {
1030 return NULL; 1030 return NULL;
1031 } 1031 }
1032 1032
1033 node->left = NULL;
1034 node->right = NULL;
1035 node->tree = NULL;
1033 node->exact = lq->exact; 1036 node->exact = lq->exact;
1034 node->inclusive = lq->inclusive; 1037 node->inclusive = lq->inclusive;
1035 1038
1036 node->auto_redirect = (u_char) ((lq->exact && lq->exact->auto_redirect) 1039 node->auto_redirect = (u_char) ((lq->exact && lq->exact->auto_redirect)
1037 || (lq->inclusive && lq->inclusive->auto_redirect)); 1040 || (lq->inclusive && lq->inclusive->auto_redirect));
1295 static ngx_int_t 1298 static ngx_int_t
1296 ngx_http_optimize_servers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf, 1299 ngx_http_optimize_servers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf,
1297 ngx_array_t *in_ports) 1300 ngx_array_t *in_ports)
1298 { 1301 {
1299 ngx_int_t rc; 1302 ngx_int_t rc;
1300 ngx_uint_t s, p, a, i; 1303 ngx_uint_t s, p, a;
1301 ngx_hash_init_t hash; 1304 ngx_hash_init_t hash;
1302 ngx_http_server_name_t *name; 1305 ngx_http_server_name_t *name;
1303 ngx_hash_keys_arrays_t ha; 1306 ngx_hash_keys_arrays_t ha;
1304 ngx_http_conf_in_port_t *in_port; 1307 ngx_http_conf_in_port_t *in_port;
1305 ngx_http_conf_in_addr_t *in_addr; 1308 ngx_http_conf_in_addr_t *in_addr;
1306 #if (NGX_PCRE) 1309 #if (NGX_PCRE)
1307 ngx_uint_t regex; 1310 ngx_uint_t regex, i;
1308 #endif 1311 #endif
1309 1312
1310 in_port = in_ports->elts; 1313 in_port = in_ports->elts;
1311 for (p = 0; p < in_ports->nelts; p++) { 1314 for (p = 0; p < in_ports->nelts; p++) {
1312 1315