mirror of
https://github.com/nginx/nginx.git
synced 2024-12-11 09:49:02 +08:00
Request body: only read body in main request (ticket #330).
Before 1.3.9 an attempt to read body in a subrequest only caused problems if body wasn't already read or discarded in a main request. Starting with 1.3.9 it might also cause problems if body was discarded by a main request before subrequest start. Fix is to just ignore attempts to read request body in a subrequest, which looks like right thing to do anyway.
This commit is contained in:
parent
7ea00fb58c
commit
0dee57d865
@ -49,7 +49,7 @@ ngx_http_read_client_request_body(ngx_http_request_t *r,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (r->request_body || r->discard_body) {
|
||||
if (r != r->main || r->request_body || r->discard_body) {
|
||||
post_handler(r);
|
||||
return NGX_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user