|
23 | 23 | # attributes |
24 | 24 | CLIENT_MAX_BODY_SIZE = attribute( |
25 | 25 | '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.', |
27 | 27 | default: '1k' |
28 | 28 | ) |
29 | 29 |
|
30 | 30 | CLIENT_BODY_BUFFER_SIZE = attribute( |
31 | 31 | '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.', |
33 | 39 | default: '1k' |
34 | 40 | ) |
35 | 41 |
|
|
131 | 137 | its('client_max_body_size') { should eq CLIENT_MAX_BODY_SIZE } |
132 | 138 | end |
133 | 139 | 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 } |
135 | 141 | end |
136 | 142 | describe parse_config_file(nginx_hardening, options) do |
137 | 143 | its('large_client_header_buffers') { should eq '2 1k' } |
|
0 commit comments