HTTP variables
$request_length variable (HTTP)
Accounted incoming request bytes across request line, headers and body. Compare with body size only after allowing for framing and metadata. Version: 1.3.12 / 1.2.7. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.
Formal Syntax & Structure
nginx syntaxnginx
$request_lengthWorking Example
Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_request_length escape=json '{"observed":"$request_length"}';