aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request_body.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-04-01 16:20:53 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-04-01 16:20:53 +0000
commitdbb27765706e2d2f35b0af57c317b58d2d9d6ec9 (patch)
tree69760523cc77e8244f0f1d5c3c0247544a1179b9 /src/http/ngx_http_request_body.c
parent205dc145c5d22613826927d6ae8ccd3a69d0e907 (diff)
downloadnginx-dbb27765706e2d2f35b0af57c317b58d2d9d6ec9.tar.gz
nginx-dbb27765706e2d2f35b0af57c317b58d2d9d6ec9.zip
nginx-0.0.3-2004-04-01-20:20:53 import
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r--src/http/ngx_http_request_body.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 9f1260c6f..c4aada505 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -11,10 +11,10 @@ static ngx_int_t ngx_http_do_read_client_request_body(ngx_http_request_t *r);
ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r)
{
- ssize_t size;
- ngx_hunk_t *h;
- ngx_chain_t *cl;
-
+ ssize_t size;
+ ngx_hunk_t *h;
+ ngx_chain_t *cl;
+ ngx_http_core_loc_conf_t *clcf;
size = r->header_in->last - r->header_in->pos;
@@ -47,15 +47,18 @@ ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r)
}
+ clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
+
r->request_body->rest = r->headers_in.content_length_n - size;
if (r->request_body->rest
- < r->request_body->buf_size + (r->request_body->buf_size >> 2))
+ < clcf->client_body_buffer_size
+ + (clcf->client_body_buffer_size >> 2))
{
size = r->request_body->rest;
} else {
- size = r->request_body->buf_size;
+ size = clcf->client_body_buffer_size;
}
ngx_test_null(r->request_body->buf, ngx_create_temp_hunk(r->pool, size),