diff src/http/modules/ngx_http_rewrite_module.c @ 308:94e16de3c33f NGINX_0_5_24

nginx 0.5.24 *) Security: the "ssl_verify_client" directive did not work if request was made using HTTP/0.9. *) Bugfix: a part of response body might be passed uncompressed if gzip was used; bug appeared in 0.5.23.
author Igor Sysoev <http://sysoev.ru>
date Wed, 06 Jun 2007 00:00:00 +0400
parents cba14c1e2a4b
children 10cc350ed8a1
line wrap: on
line diff
--- a/src/http/modules/ngx_http_rewrite_module.c
+++ b/src/http/modules/ngx_http_rewrite_module.c
@@ -567,15 +567,14 @@ ngx_http_rewrite_if(ngx_conf_t *cf, ngx_
     clcf->name = pclcf->name;
     clcf->noname = 1;
 
-    if (pclcf->locations.elts == NULL) {
-        if (ngx_array_init(&pclcf->locations, cf->pool, 4, sizeof(void *))
-            == NGX_ERROR)
-        {
+    if (pclcf->locations == NULL) {
+        pclcf->locations = ngx_array_create(cf->pool, 2, sizeof(void *));
+        if (pclcf->locations == NULL) {
             return NGX_CONF_ERROR;
         }
     }
 
-    clcfp = ngx_array_push(&pclcf->locations);
+    clcfp = ngx_array_push(pclcf->locations);
     if (clcfp == NULL) {
         return NGX_CONF_ERROR;
     }