MINOR: h1: Raise the chunk size limit up to (2^52 - 1)
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 27 Jan 2021 14:17:13 +0000 (15:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 Feb 2021 16:25:02 +0000 (17:25 +0100)
commit195be97653f2cdb093fcdecb5ac7eba2e63532cb
tree7b3924706808bfcb74035704efd8eb0c6e7a4445
parent5fe86682929affd9c0703d14c0129d048a4eb1f6
MINOR: h1: Raise the chunk size limit up to (2^52 - 1)

The allowed chunk size was historically limited to 2GB to avoid risk of
overflow. This restriction is no longer necessary because the chunk size is
immediately stored into a 64bits integer after the parsing. Thus, it is now
possible to raise this limit. However to never fed possibly bogus values
from languages that use floats for their integers, we don't get more than 13
hexa-digit (2^52 - 1). 4 petabytes is probably enough !

This patch should fix the issue #1065. It may be backported as far as
2.1. For the 2.0, the legacy HTTP part must be reviewed. But there is
honestely no reason to do so.

(cherry picked from commit 405f05465252498429fb9dc38db40f0803f7cb69)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/h1.h
src/h1_htx.c