changeset 4006:87f47e05fc82

Fix body with request_body_in_single_buf. If there were preread data and request body was big enough first part of the request body was duplicated. See report here: http://mailman.nginx.org/pipermail/nginx/2011-July/027756.html
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 18 Aug 2011 15:52:00 +0000
parents e56c1e9873cb
children 7e3c557c2604
files src/http/ngx_http_request_body.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -372,7 +372,9 @@ ngx_http_do_read_client_request_body(ngx
         }
     }
 
-    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;
     }