]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: config: set tune.maxrewrite to 1024 by default
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Sep 2015 11:53:23 +0000 (13:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Sep 2015 11:59:41 +0000 (13:59 +0200)
commit270978492c62550d0fa255698ee99a1bafbfc540
treee7a830f0b4739bbd206b48cbfabaf349afc08b3c
parent9b69454570f52eec12fb10a0c1012b8915ad6575
MEDIUM: config: set tune.maxrewrite to 1024 by default

The tune.maxrewrite parameter used to be pre-initialized to half of
the buffer size since the very early days when buffers were very small.
It has grown to absurdly large values over the years to reach 8kB for a
16kB buffer. This prevents large requests from being accepted, which is
the opposite of the initial goal.

Many users fix it to 1024 which is already quite large for header
addition.

So let's change the default setting policy :
  - pre-initialize it to 1024
  - let the user tweak it
  - in any case, limit it to tune.bufsize / 2

This results in 15kB usable to buffer HTTP messages instead of 8kB, and
doesn't affect existing configurations which already force it.
include/common/defaults.h
src/cfgparse.c
src/haproxy.c