[nginx] svn commit: r4935 - trunk/src/http

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Nov 26 17:59:31 UTC 2012


Author: mdounin
Date: 2012-11-26 17:59:30 +0000 (Mon, 26 Nov 2012)
New Revision: 4935
URL: http://trac.nginx.org/nginx/changeset/4935/nginx

Log:
Request body: fixed discard of chunked request body.

Even if there is no preread data, make sure to always call
ngx_http_discard_request_body_filter() in case of chunked request
body to initialize r->headers_in.content_length_n for later use.


Modified:
   trunk/src/http/ngx_http_request_body.c

Modified: trunk/src/http/ngx_http_request_body.c
===================================================================
--- trunk/src/http/ngx_http_request_body.c	2012-11-23 12:43:58 UTC (rev 4934)
+++ trunk/src/http/ngx_http_request_body.c	2012-11-26 17:59:30 UTC (rev 4935)
@@ -459,7 +459,7 @@
 
     size = r->header_in->last - r->header_in->pos;
 
-    if (size) {
+    if (size || r->headers_in.chunked) {
         rc = ngx_http_discard_request_body_filter(r, r->header_in);
 
         if (rc != NGX_OK) {



More information about the nginx-devel mailing list