Mercurial > hg > nginx
changeset 5256:b66ec10e901a
Fixed ngx_http_parse_chunked() minimal length calculation.
Minimal data length we expect for further calls was calculated incorrectly
if parsing stopped right after parsing chunk size. This might in theory
affect clients and/or backends using LF instead of CRLF.
Patch by Dmitry Popov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 28 Jun 2013 13:55:05 +0400 |
parents | 7f4ec5bfb715 |
children | 5bdca4812974 |
files | src/http/ngx_http_parse.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c Wed Jun 26 15:47:27 2013 +0400 +++ b/src/http/ngx_http_parse.c Fri Jun 28 13:55:05 2013 +0400 @@ -2180,8 +2180,9 @@ ctx->length = 3 /* "0" LF LF */; break; case sw_chunk_size: - ctx->length = 2 /* LF LF */ - + (ctx->size ? ctx->size + 4 /* LF "0" LF LF */ : 0); + ctx->length = 1 /* LF */ + + (ctx->size ? ctx->size + 4 /* LF "0" LF LF */ + : 1 /* LF */); break; case sw_chunk_extension: case sw_chunk_extension_almost_done: