← All status codes4xx – Client Error

HTTP 411 – Length Required

The server refuses to accept the request without a defined Content-Length header.

Common use case

Returned by servers that reject chunked or streamed uploads where the exact body size isn't known in advance.

Example

HTTP/1.1 411 Length Required

History

Part of the original HTTP/1.1 spec, RFC 2068 (1997).

Did you know?

Modern HTTP/1.1 clients almost always set Content-Length automatically, so this code is now rarely triggered outside of hand-rolled HTTP requests.