mirror of
https://github.com/nginx/nginx.git
synced 2024-11-28 08:09:00 +08:00
Correctly set body if it's preread and there are extra data.
Previously all available data was used as body, resulting in garbage after real body e.g. in case of pipelined requests. Make sure to use only as many bytes as request's Content-Length specifies.
This commit is contained in:
parent
950b668076
commit
f48b451195
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user