[PATCH 09 of 13] Request body: adjust b->pos when chunked parsing done

Maxim Dounin mdounin at mdounin.ru
Fri Nov 16 11:02:31 UTC 2012


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1352393278 -14400
# Node ID d04392abdec6cb1c7e3d09522288838ce90851b4
# Parent  9e14a7c2950b05c3f6550b4233ead43eefa57da5
Request body: adjust b->pos when chunked parsing done.

This is a nop for the current code, though will allow to correctly parse
pipelined requests.

diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -2065,6 +2065,9 @@ data:
 
 done:
 
+    ctx->state = 0;
+    b->pos = pos + 1;
+
     return NGX_DONE;
 
 invalid:



More information about the nginx-devel mailing list