summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/http/ngx_http_request_body.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/nginx/src/http/ngx_http_request_body.c')
-rw-r--r--usr.sbin/nginx/src/http/ngx_http_request_body.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/nginx/src/http/ngx_http_request_body.c b/usr.sbin/nginx/src/http/ngx_http_request_body.c
index be311a6129f..817b48e4555 100644
--- a/usr.sbin/nginx/src/http/ngx_http_request_body.c
+++ b/usr.sbin/nginx/src/http/ngx_http_request_body.c
@@ -143,6 +143,7 @@ ngx_http_read_client_request_body(ngx_http_request_t *r,
r->header_in->pos += (size_t) r->headers_in.content_length_n;
r->request_length += r->headers_in.content_length_n;
+ b->last = r->header_in->pos;
if (r->request_body_in_file_only) {
if (ngx_http_write_request_body(r, rb->bufs) != NGX_OK) {
@@ -371,10 +372,14 @@ ngx_http_do_read_client_request_body(ngx_http_request_t *r)
}
}
- if (r->request_body_in_file_only && rb->bufs->next) {
+ if (rb->bufs->next
+ && (r->request_body_in_file_only || r->request_body_in_single_buf))
+ {
rb->bufs = rb->bufs->next;
}
+ r->read_event_handler = ngx_http_block_reading;
+
rb->post_handler(r);
return NGX_OK;