Trying to confirm syntax of CLIENT_MAX_BODY_SIZE environment variable

D
  • 3 Dec '22
(Sorry if this is a dup. I sent this originally before my subscription was
confirmed.)

I was told that v1.22 of nginx will look for a CLIENT_MAX_BODY_SIZE
environment variable to configure the "client_max_body_size" configuration
property.  I'm having trouble finding a clear statement of what the
required syntax is for that.

The documentation for the configuration property, at
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
, simply uses "m" as an example, but it doesn't actually say anything about
what the required syntax is.  Does it only allow "m", or does it check for
"M" or other variations?

Similarly, is the required syntax for the environment variable the same?
Is it really v1.22 that will check for that environment variable?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20221203/cc51df54/attachment.htm>
S
  • 4 Dec '22
Hi David,

On Sat, Dec 03, 2022 at 10:07:51AM -0800, David Karr wrote:
> 
> I was told that v1.22 of nginx will look for a CLIENT_MAX_BODY_SIZE
> environment variable to configure the "client_max_body_size" configuration
> property.  I'm having trouble finding a clear statement of what the
> required syntax is for that.

That's not correct, to make sure how it works please go ahead and take a
look on the env directive [1].

> The documentation for the configuration property, at
> http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
> , simply uses "m" as an example, but it doesn't actually say anything about
> what the required syntax is.  Does it only allow "m", or does it check for
> "M" or other variations?

Please take a look on the following document [2].

References
1. https://nginx.org/en/docs/ngx_core_module.html#env
2. https://nginx.org/en/docs/syntax.html

Hope that helps.

-- 
Sergey A. Osokin