# HG changeset patch # User Maxim Dounin # Date 1366107299 0 # Node ID f458156fd46a43c5ccf388b5a963bc8db25ff8c5 # Parent 5373be93c0be7f9c6893e1aba29e682620676992 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. diff -r 5373be93c0be -r f458156fd46a src/http/ngx_http_request_body.c --- a/src/http/ngx_http_request_body.c Fri Apr 12 19:12:13 2013 +0000 +++ b/src/http/ngx_http_request_body.c Tue Apr 16 10:14:59 2013 +0000 @@ -49,7 +49,7 @@ } #endif - if (r->request_body || r->discard_body) { + if (r != r->main || r->request_body || r->discard_body) { post_handler(r); return NGX_OK; }