HTTP variables
$content_length variable (HTTP)
Value of the incoming Content-Length field, when present. Its absence is not proof of an empty body; distinguish framing from application-level size checks. Version: Introduction not established. 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
$content_lengthWorking Example
Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_content_length escape=json '{"observed":"$content_length"}';