HTTP directives
lingering_close directive (HTTP)
Choose connection shutdown handling for unread client data. Retain normal heuristics rather than disabling protocol-safe closure. Context: http, server, location. Documented default: on. Version: 1.1.0 / 1.0.6. OSS documentation; check target build. For HTTP/2 closing use server context (1.19.1+). Example is a partial http configuration fragment; use a disposable lab, not a production tuning prescription.
Formal Syntax & Structure
nginx syntaxnginx
lingering_close off | on | always;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| mode | off | on | always | Off closes immediately; on uses heuristics; always waits for additional data. |
Working Example
Example Snippetnginx
lingering_close on;