Skip to content

Commit e863d8d

Browse files
committed
DOC: config: Improve documentation of tune.http.maxhdr directive
The description was inproved to clrealy mentionned it is applied on received requests and responses. In addition, a comment was added about HTTP/2 and HTTP/3 limitation when messages are encoded to be sent.
1 parent 3bd9a9e commit e863d8d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

doc/configuration.txt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3787,15 +3787,22 @@ tune.http.logurilen <number>
37873787
The default value is 1024.
37883788

37893789
tune.http.maxhdr <number>
3790-
Sets the maximum number of headers in a request. When a request comes with a
3791-
number of headers greater than this value (including the first line), it is
3792-
rejected with a "400 Bad Request" status code. Similarly, too large responses
3793-
are blocked with "502 Bad Gateway". The default value is 101, which is enough
3794-
for all usages, considering that the widely deployed Apache server uses the
3795-
same limit. It can be useful to push this limit further to temporarily allow
3796-
a buggy application to work by the time it gets fixed. The accepted range is
3797-
1..32767. Keep in mind that each new header consumes 32bits of memory for
3798-
each stream, so don't push this limit too high.
3790+
Sets the maximum number of headers allowed in received HTTP messages. When a
3791+
message comes with a number of headers greater than this value (including the
3792+
first line), it is rejected with a "400 Bad Request" status code for a
3793+
request, or "502 Bad Gateway" for a response. The default value is 101, which
3794+
is enough for all usages, considering that the widely deployed Apache server
3795+
uses the same limit. It can be useful to push this limit further to
3796+
temporarily allow a buggy application to work by the time it gets fixed. The
3797+
accepted range is 1..32767. Keep in mind that each new header consumes 32bits
3798+
of memory for each stream, so don't push this limit too high.
3799+
3800+
Note that HTTP/1.1 is a text protocol, so there is no special limit when the
3801+
message is sent. The limit during the message parsing is sufficient. HTTP/2
3802+
and HTTP/3 are binary protocols and require an encoding step. A limit is set
3803+
too when headers are encoded to comply to limitation imposed by the
3804+
protocols. This limit is large enough but not documented on purpose. The same
3805+
limit is applied on the first steps of the decoding for the same reason.
37993806

38003807
tune.idle-pool.shared { on | off }
38013808
Enables ('on') or disables ('off') sharing of idle connection pools between

0 commit comments

Comments
 (0)