What I'm trying to do
I'm trying to limit the chunk size, as in, the maximum size a response body can have for an nginx v1.19.7.
What I tried
I found various parameters that do similar things in the nginx docs, among them client_body_buffer_size
.
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.
Which does not sound like it's limiting the size of response chunks, but rather how buffer size for incoming packages with any kind chunk size.
Similarly i can configure: chunked_transfer_encoding
which the docs say is
Allows disabling chunked transfer encoding in HTTP/1.1. It may come in handy when using a software failing to support chunked encoding despite the standard’s requirement.
This sounds like it's disabling the chunked transfer, but I have not found the configuration option to limit the chunk size for the chunked transfer.
Which parameter am I missing?
Edit:
I found the HTTP/2 parameter http2_chunk_size
but I'm unsure if it's related.
Sets the maximum size of chunks into which the response body is sliced. A too low value results in higher overhead. A too high value impairs prioritization due to HOL blocking.
it sounds like it, but I'm not sure. It was added in v1.9.5.