*) back out r2040
*) refactor ngx_palloc()
*) introduce ngx_pnalloc()
*) additional pool blocks have smaller header
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 9ea987f..a42d1e2 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -654,7 +654,7 @@
if (r->complex_uri || r->quoted_uri) {
- r->uri.data = ngx_palloc(r->pool, r->uri.len + 1);
+ r->uri.data = ngx_pnalloc(r->pool, r->uri.len + 1);
if (r->uri.data == NULL) {
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
@@ -914,7 +914,7 @@
h->value.data = r->header_start;
h->value.data[h->value.len] = '\0';
- h->lowcase_key = ngx_palloc(r->pool, h->key.len);
+ h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
if (h->lowcase_key == NULL) {
ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
@@ -1562,7 +1562,7 @@
server = buf;
} else {
- server = ngx_palloc(r->pool, len);
+ server = ngx_pnalloc(r->pool, len);
if (server == NULL) {
return NGX_ERROR;
}