mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MEDIUM: sink: don't perform implicit truncations when maxlen is not set
maxlen now defaults ~0 (instead of BUFSIZE) to make sure no implicit truncation will be performed when the option is not specified, since the doc doesn't mention any default value for maxlen. As such, if the payload is too big, it will be dropped (this is the default expected behavior).
This commit is contained in:
parent
fdf82d058b
commit
32f1db6d0d
1 changed files with 1 additions and 1 deletions
|
|
@ -1190,7 +1190,7 @@ int cfg_post_parse_ring()
|
|||
|
||||
if (cfg_sink && (cfg_sink->type == SINK_TYPE_BUFFER)) {
|
||||
if (!cfg_sink->maxlen)
|
||||
cfg_sink->maxlen = BUFSIZE; // maxlen not set: use default value
|
||||
cfg_sink->maxlen = ~0; // maxlen not set: no implicit truncation
|
||||
else if (cfg_sink->maxlen > ring_max_payload(cfg_sink->ctx.ring)) {
|
||||
/* maxlen set by user however it doesn't fit: set to max value */
|
||||
ha_warning("ring '%s' event max length '%u' exceeds max payload size, forced to '%lu'.\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue