diff options
Diffstat (limited to 'src/http/modules')
-rw-r--r-- | src/http/modules/ngx_http_auth_basic_module.c | 4 | ||||
-rw-r--r-- | src/http/modules/ngx_http_autoindex_module.c | 4 | ||||
-rw-r--r-- | src/http/modules/ngx_http_dav_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_fastcgi_module.c | 12 | ||||
-rw-r--r-- | src/http/modules/ngx_http_gzip_filter_module.c | 4 | ||||
-rw-r--r-- | src/http/modules/ngx_http_headers_filter_module.c | 6 | ||||
-rw-r--r-- | src/http/modules/ngx_http_index_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_log_module.c | 4 | ||||
-rw-r--r-- | src/http/modules/ngx_http_map_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 14 | ||||
-rw-r--r-- | src/http/modules/ngx_http_range_filter_module.c | 18 | ||||
-rw-r--r-- | src/http/modules/ngx_http_realip_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_ssi_filter_module.c | 30 | ||||
-rw-r--r-- | src/http/modules/ngx_http_static_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_sub_filter_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_userid_filter_module.c | 8 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.xs | 10 | ||||
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 2 |
18 files changed, 64 insertions, 64 deletions
diff --git a/src/http/modules/ngx_http_auth_basic_module.c b/src/http/modules/ngx_http_auth_basic_module.c index 41e53cd94..b09359d2a 100644 --- a/src/http/modules/ngx_http_auth_basic_module.c +++ b/src/http/modules/ngx_http_auth_basic_module.c @@ -232,7 +232,7 @@ ngx_http_auth_basic_handler(ngx_http_request_t *r) if (state == sw_passwd) { pwd.len = i - passwd; - pwd.data = ngx_palloc(r->pool, pwd.len + 1); + pwd.data = ngx_pnalloc(r->pool, pwd.len + 1); if (pwd.data == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } @@ -400,7 +400,7 @@ ngx_http_auth_basic(ngx_conf_t *cf, void *post, void *data) len = sizeof("Basic realm=\"") - 1 + realm->len + 1; - basic = ngx_palloc(cf->pool, len); + basic = ngx_pnalloc(cf->pool, len); if (basic == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_autoindex_module.c b/src/http/modules/ngx_http_autoindex_module.c index f57fbc87d..b5b6ef7f3 100644 --- a/src/http/modules/ngx_http_autoindex_module.c +++ b/src/http/modules/ngx_http_autoindex_module.c @@ -282,7 +282,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) allocated = path.len + 1 + len + 1 + NGX_HTTP_AUTOINDEX_PREALLOCATE; - filename = ngx_palloc(pool, allocated); + filename = ngx_pnalloc(pool, allocated); if (filename == NULL) { return ngx_http_autoindex_error(r, &dir, &path); } @@ -318,7 +318,7 @@ ngx_http_autoindex_handler(ngx_http_request_t *r) entry->name.len = len; - entry->name.data = ngx_palloc(pool, len + 1); + entry->name.data = ngx_pnalloc(pool, len + 1); if (entry->name.data == NULL) { return ngx_http_autoindex_error(r, &dir, &path); } diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c index 3d54525e8..33bb2e9c1 100644 --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -1102,7 +1102,7 @@ ngx_http_dav_location(ngx_http_request_t *r, u_char *path) location = path + clcf->root.len; } else { - location = ngx_palloc(r->pool, r->uri.len); + location = ngx_pnalloc(r->pool, r->uri.len); if (location == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c index 5569745d6..b975c0675 100644 --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -1059,7 +1059,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r) size += part[i].end - part[i].start; } - p = ngx_palloc(r->pool, size); + p = ngx_pnalloc(r->pool, size); if (p == NULL) { return NGX_ERROR; } @@ -1087,7 +1087,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r) 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) { return NGX_ERROR; } @@ -1097,9 +1097,9 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r) 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.len + 1 + h->value.len + 1 - + h->key.len); + 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; } @@ -2015,7 +2015,7 @@ ngx_http_fastcgi_script_name_variable(ngx_http_request_t *r, v->len = r->uri.len + flcf->index.len; - v->data = ngx_palloc(r->pool, v->len); + v->data = ngx_pnalloc(r->pool, v->len); if (v->data == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_gzip_filter_module.c b/src/http/modules/ngx_http_gzip_filter_module.c index 1587c009d..367731898 100644 --- a/src/http/modules/ngx_http_gzip_filter_module.c +++ b/src/http/modules/ngx_http_gzip_filter_module.c @@ -802,7 +802,7 @@ ngx_http_gzip_ratio_variable(ngx_http_request_t *r, return NGX_OK; } - v->data = ngx_palloc(r->pool, NGX_INT32_LEN + 3); + v->data = ngx_pnalloc(r->pool, NGX_INT32_LEN + 3); if (v->data == NULL) { return NGX_ERROR; } @@ -951,7 +951,7 @@ ngx_http_gzip_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) type->len = value[i].len; - type->data = ngx_palloc(cf->pool, type->len + 1); + type->data = ngx_pnalloc(cf->pool, type->len + 1); if (type->data == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_headers_filter_module.c b/src/http/modules/ngx_http_headers_filter_module.c index ad9467ba9..95d846ffb 100644 --- a/src/http/modules/ngx_http_headers_filter_module.c +++ b/src/http/modules/ngx_http_headers_filter_module.c @@ -264,7 +264,7 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf) return NGX_OK; } - expires->value.data = ngx_palloc(r->pool, len); + expires->value.data = ngx_pnalloc(r->pool, len); if (expires->value.data == NULL) { return NGX_ERROR; } @@ -297,8 +297,8 @@ ngx_http_set_expires(ngx_http_request_t *r, ngx_http_headers_conf_t *conf) return NGX_OK; } - cc->value.data = ngx_palloc(r->pool, - sizeof("max-age=") + NGX_TIME_T_LEN + 1); + cc->value.data = ngx_pnalloc(r->pool, + sizeof("max-age=") + NGX_TIME_T_LEN + 1); if (cc->value.data == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_index_module.c b/src/http/modules/ngx_http_index_module.c index 6bfb04565..bd9c18c9d 100644 --- a/src/http/modules/ngx_http_index_module.c +++ b/src/http/modules/ngx_http_index_module.c @@ -254,7 +254,7 @@ ngx_http_index_handler(ngx_http_request_t *r) uri.data = path.data + root; } else { - uri.data = ngx_palloc(r->pool, uri.len); + uri.data = ngx_pnalloc(r->pool, uri.len); if (uri.data == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index 3d8730a1a..47358ed54 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -261,7 +261,7 @@ ngx_http_log_handler(ngx_http_request_t *r) } } - line = ngx_palloc(r->pool, len); + line = ngx_pnalloc(r->pool, len); if (line == NULL) { return NGX_ERROR; } @@ -970,7 +970,7 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *ops, } else { op->run = ngx_http_log_copy_long; - p = ngx_palloc(cf->pool, len); + p = ngx_pnalloc(cf->pool, len); if (p == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_map_module.c b/src/http/modules/ngx_http_map_module.c index c1d87c1a1..cedc50879 100644 --- a/src/http/modules/ngx_http_map_module.c +++ b/src/http/modules/ngx_http_map_module.c @@ -130,7 +130,7 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, return NGX_OK; } - name = ngx_palloc(r->pool, len); + name = ngx_pnalloc(r->pool, len); if (name == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 619390b96..278edb69f 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -964,8 +964,8 @@ ngx_http_proxy_process_status_line(ngx_http_request_t *r) 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 @@ ngx_http_proxy_process_header(ngx_http_request_t *r) 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 @@ ngx_http_proxy_add_x_forwarded_for_variable(ngx_http_request_t *r, 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 @@ ngx_http_proxy_internal_body_length_variable(ngx_http_request_t *r, 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 @@ ngx_http_proxy_rewrite_redirect_text(ngx_http_request_t *r, ngx_table_elt_t *h, 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 @@ ngx_http_proxy_rewrite_redirect_vars(ngx_http_request_t *r, ngx_table_elt_t *h, len += lcode(&e); } - data = ngx_palloc(r->pool, len); + data = ngx_pnalloc(r->pool, len); if (data == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c index cf42daf6f..e2137f299 100644 --- a/src/http/modules/ngx_http_range_filter_module.c +++ b/src/http/modules/ngx_http_range_filter_module.c @@ -307,7 +307,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r) content_range->key.len = sizeof("Content-Range") - 1; content_range->key.data = (u_char *) "Content-Range"; - content_range->value.data = ngx_palloc(r->pool, + content_range->value.data = ngx_pnalloc(r->pool, sizeof("bytes */") - 1 + NGX_OFF_T_LEN); if (content_range->value.data == NULL) { return NGX_ERROR; @@ -341,7 +341,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r) content_range->key.data = (u_char *) "Content-Range"; content_range->value.data = - ngx_palloc(r->pool, sizeof("bytes -/") - 1 + 3 * NGX_OFF_T_LEN); + ngx_pnalloc(r->pool, sizeof("bytes -/") - 1 + 3 * NGX_OFF_T_LEN); if (content_range->value.data == NULL) { return NGX_ERROR; } @@ -376,7 +376,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r) len += sizeof("; charset=") - 1 + r->headers_out.charset.len; } - ctx->boundary_header.data = ngx_palloc(r->pool, len); + ctx->boundary_header.data = ngx_pnalloc(r->pool, len); if (ctx->boundary_header.data == NULL) { return NGX_ERROR; } @@ -414,9 +414,9 @@ ngx_http_range_header_filter(ngx_http_request_t *r) } r->headers_out.content_type.data = - ngx_palloc(r->pool, - sizeof("Content-Type: multipart/byteranges; boundary=") - 1 - + NGX_ATOMIC_T_LEN); + ngx_pnalloc(r->pool, + sizeof("Content-Type: multipart/byteranges; boundary=") - 1 + + NGX_ATOMIC_T_LEN); if (r->headers_out.content_type.data == NULL) { return NGX_ERROR; @@ -441,7 +441,7 @@ ngx_http_range_header_filter(ngx_http_request_t *r) /* the size of the range: "SSSS-EEEE/TTTT" CRLF CRLF */ range[i].content_range.data = - ngx_palloc(r->pool, 3 * NGX_OFF_T_LEN + 2 + 4); + ngx_pnalloc(r->pool, 3 * NGX_OFF_T_LEN + 2 + 4); if (range[i].content_range.data == NULL) { return NGX_ERROR; @@ -649,8 +649,8 @@ ngx_http_range_body_filter(ngx_http_request_t *r, ngx_chain_t *in) b->temporary = 1; b->last_buf = 1; - b->pos = ngx_palloc(r->pool, sizeof(CRLF "--") - 1 + NGX_ATOMIC_T_LEN - + sizeof("--" CRLF) - 1); + b->pos = ngx_pnalloc(r->pool, sizeof(CRLF "--") - 1 + NGX_ATOMIC_T_LEN + + sizeof("--" CRLF) - 1); if (b->pos == NULL) { return NGX_ERROR; } diff --git a/src/http/modules/ngx_http_realip_module.c b/src/http/modules/ngx_http_realip_module.c index 4de4c1317..bff83c227 100644 --- a/src/http/modules/ngx_http_realip_module.c +++ b/src/http/modules/ngx_http_realip_module.c @@ -163,7 +163,7 @@ ngx_http_realip_handler(ngx_http_request_t *r) return NGX_DECLINED; } - p = ngx_palloc(r->connection->pool, len); + p = ngx_pnalloc(r->connection->pool, len); if (p == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index e182619c9..a855868c4 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -1151,8 +1151,8 @@ ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) default: ctx->command.len = 1; - ctx->command.data = ngx_palloc(r->pool, - NGX_HTTP_SSI_COMMAND_LEN); + ctx->command.data = ngx_pnalloc(r->pool, + NGX_HTTP_SSI_COMMAND_LEN); if (ctx->command.data == NULL) { return NGX_ERROR; } @@ -1218,8 +1218,8 @@ ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) } ctx->param->key.len = 1; - ctx->param->key.data = ngx_palloc(r->pool, - NGX_HTTP_SSI_PARAM_LEN); + ctx->param->key.data = ngx_pnalloc(r->pool, + NGX_HTTP_SSI_PARAM_LEN); if (ctx->param->key.data == NULL) { return NGX_ERROR; } @@ -1229,8 +1229,8 @@ ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) ctx->param->value.len = 0; if (ctx->value_buf == NULL) { - ctx->param->value.data = ngx_palloc(r->pool, - ctx->value_len); + ctx->param->value.data = ngx_pnalloc(r->pool, + ctx->value_len); if (ctx->param->value.data == NULL) { return NGX_ERROR; } @@ -1408,7 +1408,7 @@ ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) case ssi_postparam_state: if (ctx->param->value.len + 1 < ctx->value_len / 2) { - value = ngx_palloc(r->pool, ctx->param->value.len + 1); + value = ngx_pnalloc(r->pool, ctx->param->value.len + 1); if (value == NULL) { return NGX_ERROR; } @@ -1626,7 +1626,7 @@ ngx_http_ssi_evaluate_string(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, if (prefix) { len = prefix + text->len; - data = ngx_palloc(r->pool, len); + data = ngx_pnalloc(r->pool, len); if (data == NULL) { return NGX_ERROR; } @@ -1829,7 +1829,7 @@ ngx_http_ssi_evaluate_string(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, } } - p = ngx_palloc(r->pool, len + ((flags & NGX_HTTP_SSI_ADD_ZERO) ? 1 : 0)); + p = ngx_pnalloc(r->pool, len + ((flags & NGX_HTTP_SSI_ADD_ZERO) ? 1 : 0)); if (p == NULL) { return NGX_ERROR; } @@ -2222,7 +2222,7 @@ ngx_http_ssi_echo(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, NGX_ESCAPE_HTML); if (len) { - p = ngx_palloc(r->pool, value->len + len); + p = ngx_pnalloc(r->pool, value->len + len); if (p == NULL) { return NGX_HTTP_SSI_ERROR; } @@ -2239,7 +2239,7 @@ ngx_http_ssi_echo(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, len = ngx_escape_html(NULL, value->data, value->len); if (len) { - p = ngx_palloc(r->pool, value->len + len); + p = ngx_pnalloc(r->pool, value->len + len); if (p == NULL) { return NGX_HTTP_SSI_ERROR; } @@ -2286,7 +2286,7 @@ ngx_http_ssi_config(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, if (value) { ctx->timefmt.len = value->len; - ctx->timefmt.data = ngx_palloc(r->pool, value->len + 1); + ctx->timefmt.data = ngx_pnalloc(r->pool, value->len + 1); if (ctx->timefmt.data == NULL) { return NGX_HTTP_SSI_ERROR; } @@ -2666,7 +2666,7 @@ ngx_http_ssi_date_gmt_local_variable(ngx_http_request_t *r, || (ctx->timefmt.len == sizeof("%s") - 1 && ctx->timefmt.data[0] == '%' && ctx->timefmt.data[1] == 's')) { - v->data = ngx_palloc(r->pool, NGX_TIME_T_LEN); + v->data = ngx_pnalloc(r->pool, NGX_TIME_T_LEN); if (v->data == NULL) { return NGX_ERROR; } @@ -2689,7 +2689,7 @@ ngx_http_ssi_date_gmt_local_variable(ngx_http_request_t *r, return NGX_ERROR; } - v->data = ngx_palloc(r->pool, v->len); + v->data = ngx_pnalloc(r->pool, v->len); if (v->data == NULL) { return NGX_ERROR; } @@ -2738,7 +2738,7 @@ ngx_http_ssi_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) type->len = value[i].len; - type->data = ngx_palloc(cf->pool, type->len + 1); + type->data = ngx_pnalloc(cf->pool, type->len + 1); if (type->data == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index 03d75cd80..fc84268dc 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -162,7 +162,7 @@ ngx_http_static_handler(ngx_http_request_t *r) len += r->args.len + 1; } - location = ngx_palloc(r->pool, len); + location = ngx_pnalloc(r->pool, len); if (location == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c index 663a9f5b7..6a9bb1c59 100644 --- a/src/http/modules/ngx_http_sub_filter_module.c +++ b/src/http/modules/ngx_http_sub_filter_module.c @@ -710,7 +710,7 @@ ngx_http_sub_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) type->len = value[i].len; - type->data = ngx_palloc(cf->pool, type->len + 1); + type->data = ngx_pnalloc(cf->pool, type->len + 1); if (type->data == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/ngx_http_userid_filter_module.c b/src/http/modules/ngx_http_userid_filter_module.c index dee71ff88..5082c740f 100644 --- a/src/http/modules/ngx_http_userid_filter_module.c +++ b/src/http/modules/ngx_http_userid_filter_module.c @@ -420,7 +420,7 @@ ngx_http_userid_set_uid(ngx_http_request_t *r, ngx_http_userid_ctx_t *ctx, len += conf->domain.len; } - cookie = ngx_palloc(r->pool, len); + cookie = ngx_pnalloc(r->pool, len); if (cookie == NULL) { return NGX_ERROR; } @@ -496,7 +496,7 @@ ngx_http_userid_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, ngx_str_t *name, uint32_t *uid) { v->len = name->len + sizeof("=00001111222233334444555566667777") - 1; - v->data = ngx_palloc(r->pool, v->len); + v->data = ngx_pnalloc(r->pool, v->len); if (v->data == NULL) { return NGX_ERROR; } @@ -620,7 +620,7 @@ ngx_http_userid_domain(ngx_conf_t *cf, void *post, void *data) return NGX_CONF_OK; } - new = ngx_palloc(cf->pool, sizeof("; domain=") - 1 + domain->len); + new = ngx_pnalloc(cf->pool, sizeof("; domain=") - 1 + domain->len); if (new == NULL) { return NGX_CONF_ERROR; } @@ -642,7 +642,7 @@ ngx_http_userid_path(ngx_conf_t *cf, void *post, void *data) u_char *p, *new; - new = ngx_palloc(cf->pool, sizeof("; path=") - 1 + path->len); + new = ngx_pnalloc(cf->pool, sizeof("; path=") - 1 + path->len); if (new == NULL) { return NGX_CONF_ERROR; } diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 4524a8c40..94d6a2fdd 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -48,7 +48,7 @@ ngx_http_perl_sv2str(pTHX_ ngx_http_request_t *r, ngx_str_t *s, SV *sv) return NGX_OK; } - s->data = ngx_palloc(r->pool, len); + s->data = ngx_pnalloc(r->pool, len); if (s->data == NULL) { return NGX_ERROR; } @@ -242,7 +242,7 @@ header_in(r, key) /* look up hashed headers */ - lowcase_key = ngx_palloc(r->pool, len); + lowcase_key = ngx_pnalloc(r->pool, len); if (lowcase_key == NULL) { XSRETURN_UNDEF; } @@ -293,7 +293,7 @@ header_in(r, key) size += ph[i]->value.len + sizeof("; ") - 1; } - cookie = ngx_palloc(r->pool, size); + cookie = ngx_pnalloc(r->pool, size); if (cookie == NULL) { XSRETURN_UNDEF; } @@ -769,7 +769,7 @@ unescape(r, text, type = 0) src = (u_char *) SvPV(text, len); - p = ngx_palloc(r->pool, len + 1); + p = ngx_pnalloc(r->pool, len + 1); if (p == NULL) { XSRETURN_UNDEF; } @@ -826,7 +826,7 @@ variable(r, name, value = NULL) p = (u_char *) SvPV(name, len); - lowcase = ngx_palloc(r->pool, len); + lowcase = ngx_pnalloc(r->pool, len); if (lowcase == NULL) { XSRETURN_UNDEF; } diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index ab89cadcf..262794256 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -703,7 +703,7 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, HV *nginx, SV *sub, line = SvPVx(POPs, n_a); rv->len = n_a; - rv->data = ngx_palloc(r->pool, n_a); + rv->data = ngx_pnalloc(r->pool, n_a); if (rv->data == NULL) { return NGX_ERROR; } |