Mercurial > hg > nginx-quic
comparison src/http/ngx_http_parse.c @ 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 | 55dc535ae5dc |
children | 17291cb8c76e |
comparison
equal
deleted
inserted
replaced
5255:7f4ec5bfb715 | 5256:b66ec10e901a |
---|---|
2178 | 2178 |
2179 case sw_chunk_start: | 2179 case sw_chunk_start: |
2180 ctx->length = 3 /* "0" LF LF */; | 2180 ctx->length = 3 /* "0" LF LF */; |
2181 break; | 2181 break; |
2182 case sw_chunk_size: | 2182 case sw_chunk_size: |
2183 ctx->length = 2 /* LF LF */ | 2183 ctx->length = 1 /* LF */ |
2184 + (ctx->size ? ctx->size + 4 /* LF "0" LF LF */ : 0); | 2184 + (ctx->size ? ctx->size + 4 /* LF "0" LF LF */ |
2185 : 1 /* LF */); | |
2185 break; | 2186 break; |
2186 case sw_chunk_extension: | 2187 case sw_chunk_extension: |
2187 case sw_chunk_extension_almost_done: | 2188 case sw_chunk_extension_almost_done: |
2188 ctx->length = 1 /* LF */ + ctx->size + 4 /* LF "0" LF LF */; | 2189 ctx->length = 1 /* LF */ + ctx->size + 4 /* LF "0" LF LF */; |
2189 break; | 2190 break; |