mirror of
https://github.com/nginx/nginx.git
synced 2024-11-28 08:09:00 +08:00
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.
This commit is contained in:
parent
982f4de9f0
commit
88fc0f793e
@ -2180,8 +2180,9 @@ data:
|
|||||||
ctx->length = 3 /* "0" LF LF */;
|
ctx->length = 3 /* "0" LF LF */;
|
||||||
break;
|
break;
|
||||||
case sw_chunk_size:
|
case sw_chunk_size:
|
||||||
ctx->length = 2 /* LF LF */
|
ctx->length = 1 /* LF */
|
||||||
+ (ctx->size ? ctx->size + 4 /* LF "0" LF LF */ : 0);
|
+ (ctx->size ? ctx->size + 4 /* LF "0" LF LF */
|
||||||
|
: 1 /* LF */);
|
||||||
break;
|
break;
|
||||||
case sw_chunk_extension:
|
case sw_chunk_extension:
|
||||||
case sw_chunk_extension_almost_done:
|
case sw_chunk_extension_almost_done:
|
||||||
|
Loading…
Reference in New Issue
Block a user