Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 6973:99934aade555
Use ngx_calloc_buf() where appropriate.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 12 Apr 2017 22:21:04 +0300 |
parents | 3fb9b5eb75c0 |
children | be5cfa918bfc |
comparison
equal
deleted
inserted
replaced
6972:6e8c249b34ea | 6973:99934aade555 |
---|---|
1924 | 1924 |
1925 if (r->method == NGX_HTTP_HEAD || (r != r->main && val.len == 0)) { | 1925 if (r->method == NGX_HTTP_HEAD || (r != r->main && val.len == 0)) { |
1926 return ngx_http_send_header(r); | 1926 return ngx_http_send_header(r); |
1927 } | 1927 } |
1928 | 1928 |
1929 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 1929 b = ngx_calloc_buf(r->pool); |
1930 if (b == NULL) { | 1930 if (b == NULL) { |
1931 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 1931 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
1932 } | 1932 } |
1933 | 1933 |
1934 b->pos = val.data; | 1934 b->pos = val.data; |