fix socket leak introduced in r1374 when request header and body was
in one packet and connection went to keep-alive state
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 9c34b7c..2906c89 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -446,8 +446,6 @@
         return NGX_OK;
     }
 
-    r->discard_body = 1;
-
     size = r->header_in->last - r->header_in->pos;
 
     if (size) {
@@ -461,6 +459,8 @@
         }
     }
 
+    r->discard_body = 1;
+
     r->read_event_handler = ngx_http_read_discarded_request_body_handler;
 
     if (ngx_handle_read_event(rev, 0) == NGX_ERROR) {