diff src/http/ngx_http_core_module.c @ 382:984bb0b1399b NGINX_0_7_3

nginx 0.7.3 *) Change: the "rss" extension MIME type has been changed to "application/rss+xml". *) Change: now the "gzip_vary" directive turned on issues a "Vary: Accept-Encoding" header line for uncompressed responses too. *) Feature: now the "rewrite" directive does a redirect automatically if the "https://" protocol is used. *) Bugfix: the "proxy_pass" directive did not work with the HTTPS protocol; the bug had appeared in 0.6.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Jun 2008 00:00:00 +0400
parents bc21d9cd9c54
children 12defd37f578
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -832,7 +832,7 @@ ngx_http_core_find_config_phase(ngx_http
 
         } else {
             len = clcf->name.len + 1 + r->args.len;
-            p = ngx_palloc(r->pool, len);
+            p = ngx_pnalloc(r->pool, len);
 
             if (p == NULL) {
                 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
@@ -1267,7 +1267,7 @@ ngx_http_set_content_type(ngx_http_reque
 
             if (c >= 'A' && c <= 'Z') {
 
-                p = ngx_palloc(r->pool, r->exten.len);
+                p = ngx_pnalloc(r->pool, r->exten.len);
                 if (p == NULL) {
                     return NGX_HTTP_INTERNAL_SERVER_ERROR;
                 }
@@ -1390,7 +1390,7 @@ ngx_http_map_uri_to_path(ngx_http_reques
 
         path->len = clcf->root.len + reserved;
 
-        path->data = ngx_palloc(r->pool, path->len);
+        path->data = ngx_pnalloc(r->pool, path->len);
         if (path->data == NULL) {
             return NULL;
         }
@@ -1460,7 +1460,7 @@ ngx_http_auth_basic_user(ngx_http_reques
     }
 
     auth.len = ngx_base64_decoded_length(encoded.len);
-    auth.data = ngx_palloc(r->pool, auth.len + 1);
+    auth.data = ngx_pnalloc(r->pool, auth.len + 1);
     if (auth.data == NULL) {
         return NGX_ERROR;
     }