Skip to content

Commit edd7a32

Browse files
atomic111chris-rock
authored andcommitted
add attribute client_header_buffer_size
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent 61618d9 commit edd7a32

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

controls/nginx_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@
2323
# attributes
2424
CLIENT_MAX_BODY_SIZE = attribute(
2525
'client_max_body_size',
26-
description: ' Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.',
26+
description: 'Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.',
2727
default: '1k'
2828
)
2929

3030
CLIENT_BODY_BUFFER_SIZE = attribute(
3131
'client_body_buffer_size',
32-
description: ' Sets buffer size for reading client request body. In case the request body is larger than the buffer, the whole body or only its part is written to a temporary file. By default, buffer size is equal to two memory pages. This is 8K on x86, other 32-bit platforms, and x86-64. It is usually 16K on other 64-bit platforms.',
32+
description: 'Sets buffer size for reading client request body. In case the request body is larger than the buffer, the whole body or only its part is written to a temporary file. By default, buffer size is equal to two memory pages. This is 8K on x86, other 32-bit platforms, and x86-64. It is usually 16K on other 64-bit platforms.',
33+
default: '1k'
34+
)
35+
36+
CLIENT_HEADER_BUFFER_SIZE = attribute(
37+
'client_header_buffer_size',
38+
description: 'Sets buffer size for reading client request header. For most requests, a buffer of 1K bytes is enough. However, if a request includes long cookies, or comes from a WAP client, it may not fit into 1K. If a request line or a request header field does not fit into this buffer then larger buffers, configured by the large_client_header_buffers directive, are allocated.',
3339
default: '1k'
3440
)
3541

@@ -131,7 +137,7 @@
131137
its('client_max_body_size') { should eq CLIENT_MAX_BODY_SIZE }
132138
end
133139
describe parse_config_file(nginx_hardening, options) do
134-
its('client_header_buffer_size') { should eq '1k' }
140+
its('client_header_buffer_size') { should eq CLIENT_HEADER_BUFFER_SIZE }
135141
end
136142
describe parse_config_file(nginx_hardening, options) do
137143
its('large_client_header_buffers') { should eq '2 1k' }

0 commit comments

Comments
 (0)