Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit e7bf718

Browse files
committed
Configuration: made large_header_buffers a valid setting.
This is an extension to the previous commit, which made large_header_buffer_size a valid configuration setting. This commit makes a related value, large_header_buffers, a valid configuration setting. While large_header_buffer_size effectively limits the maximum size of any single header (although unit will try to pack multiple headers into a buffer if they wholly fit). large_header_buffers limits how many of these 'large' buffers are available. It makes sense to also allow this to be user set. large_header_buffers is already set by the configuration system in nxt_router.c it just isn't set as a valid config option in nxt_conf_validation.c With this change users can set this option in their config if required by the following "settings": { "http": { "large_header_buffers": 8 } }, It retains its default value of 4 if this is not set. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
1 parent b51f55b commit e7bf718

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/changes.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ prefer system crypto policy, instead of hardcoding a default.
4343
</para>
4444
</change>
4545

46+
<change type="feature">
47+
<para>
48+
new configuration option 'large_header_buffers' for 'settings.http' to
49+
set the number of allowed large buffers. Defaults to 4.
50+
</para>
51+
</change>
52+
4653
<change type="feature">
4754
<para>
4855
new configuration option 'large_header_buffer_size' for 'settings.http' to

src/nxt_conf_validation.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ static nxt_conf_vldt_object_t nxt_conf_vldt_http_members[] = {
309309
}, {
310310
.name = nxt_string("large_header_buffer_size"),
311311
.type = NXT_CONF_VLDT_INTEGER,
312+
}, {
313+
.name = nxt_string("large_header_buffers"),
314+
.type = NXT_CONF_VLDT_INTEGER,
312315
}, {
313316
.name = nxt_string("body_buffer_size"),
314317
.type = NXT_CONF_VLDT_INTEGER,

0 commit comments

Comments
 (0)