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)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Jan 2021 15:37:14 +0000 (16:37 +0100)
commit405f05465252498429fb9dc38db40f0803f7cb69
treed41c296b8c0dd83fc3b311fed0ee813933a01dd3
parent73518be59562c0d1153c903914a336ceb8e139e9
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.
include/haproxy/h1.h
src/h1_htx.c