*) back out r2040
*) refactor ngx_palloc()
*) introduce ngx_pnalloc()
*) additional pool blocks have smaller header
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 619390b..278edb6 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -964,8 +964,8 @@
u->state->status = ctx->status;
u->headers_in.status_line.len = ctx->status_end - ctx->status_start;
- u->headers_in.status_line.data = ngx_palloc(r->pool,
- u->headers_in.status_line.len);
+ u->headers_in.status_line.data = ngx_pnalloc(r->pool,
+ u->headers_in.status_line.len);
if (u->headers_in.status_line.data == NULL) {
return NGX_ERROR;
}
@@ -1220,7 +1220,7 @@
h->key.len = r->header_name_end - r->header_name_start;
h->value.len = r->header_end - r->header_start;
- h->key.data = ngx_palloc(r->pool,
+ h->key.data = ngx_pnalloc(r->pool,
h->key.len + 1 + h->value.len + 1 + h->key.len);
if (h->key.data == NULL) {
return NGX_ERROR;
@@ -1400,7 +1400,7 @@
v->len = r->headers_in.x_forwarded_for->value.len
+ sizeof(", ") - 1 + r->connection->addr_text.len;
- p = ngx_palloc(r->pool, v->len);
+ p = ngx_pnalloc(r->pool, v->len);
if (p == NULL) {
return NGX_ERROR;
}
@@ -1435,7 +1435,7 @@
v->no_cacheable = 0;
v->not_found = 0;
- v->data = ngx_palloc(r->connection->pool, NGX_SIZE_T_LEN);
+ v->data = ngx_pnalloc(r->connection->pool, NGX_SIZE_T_LEN);
if (v->data == NULL) {
return NGX_ERROR;
@@ -1492,7 +1492,7 @@
len = prefix + pr->replacement.text.len + h->value.len - pr->redirect.len;
- data = ngx_palloc(r->pool, len);
+ data = ngx_pnalloc(r->pool, len);
if (data == NULL) {
return NGX_ERROR;
}
@@ -1544,7 +1544,7 @@
len += lcode(&e);
}
- data = ngx_palloc(r->pool, len);
+ data = ngx_pnalloc(r->pool, len);
if (data == NULL) {
return NGX_ERROR;
}