diff 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
line wrap: on
line diff
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1024,12 +1024,15 @@ ngx_http_create_locations_tree(ngx_conf_
     lq = (ngx_http_location_queue_t *) q;
     len = lq->name->len - prefix;
 
-    node = ngx_pcalloc(cf->pool,
-                       offsetof(ngx_http_location_tree_node_t, name) + len);
+    node = ngx_palloc_aligned(cf->pool,
+                          offsetof(ngx_http_location_tree_node_t, name) + len);
     if (node == NULL) {
         return NULL;
     }
 
+    node->left = NULL;
+    node->right = NULL;
+    node->tree = NULL;
     node->exact = lq->exact;
     node->inclusive = lq->inclusive;
 
@@ -1297,14 +1300,14 @@ ngx_http_optimize_servers(ngx_conf_t *cf
     ngx_array_t *in_ports)
 {
     ngx_int_t                  rc;
-    ngx_uint_t                 s, p, a, i;
+    ngx_uint_t                 s, p, a;
     ngx_hash_init_t            hash;
     ngx_http_server_name_t    *name;
     ngx_hash_keys_arrays_t     ha;
     ngx_http_conf_in_port_t   *in_port;
     ngx_http_conf_in_addr_t   *in_addr;
 #if (NGX_PCRE)
-    ngx_uint_t                 regex;
+    ngx_uint_t                 regex, i;
 #endif
 
     in_port = in_ports->elts;