]> git.kaiwu.me - nginx.git/commitdiff
Fix body with request_body_in_single_buf.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 18 Aug 2011 15:52:00 +0000 (15:52 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 18 Aug 2011 15:52:00 +0000 (15:52 +0000)
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

src/http/ngx_http_request_body.c

index 57c201b9bb5d359f99e0333e53b8b54ccadb5baf..03053c86a488e04ddd2eef27f9b0e2873f8ae442 100644 (file)
@@ -372,7 +372,9 @@ 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;
     }