aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request_body.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_request_body.c')
-rw-r--r--src/http/ngx_http_request_body.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 5cc4d5225..460cf399d 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -92,6 +92,8 @@ ngx_http_read_client_request_body(ngx_http_request_t *r,
rb->bufs->buf = b;
rb->bufs->next = NULL;
+ rb->buf = b;
+
if ((off_t) preread >= r->headers_in.content_length_n) {
/* the whole request body was pre-read */
@@ -124,8 +126,6 @@ ngx_http_read_client_request_body(ngx_http_request_t *r,
/* the whole request body may be placed in r->header_in */
- rb->buf = b;
-
r->read_event_handler = ngx_http_read_client_request_body_handler;
return ngx_http_do_read_client_request_body(r);