HTTP Status Codes

HTTP 411 Length Required

411
MediumWeb ServerReference page

Length Required — the server requires a valid Content-Length header

A 411 Length Required response means the server will not accept the request until it includes a valid Content-Length header. It is mainly about request framing, where the server wants an explicit body size before it decides to process the message.

Visual summary

A quick reference view of how HTTP 411 requires an explicit size or length declaration before a request payload can be processed.

HTTP 411 visual summary showing a request blocked at a server checkpoint due to a missing length declaration
Visual summary: 411 means the server refuses to accept the request without a defined Content-Length.

What 411 Means

The shortest useful reading of this status code.

Length Required means the server requires a valid Content-Length header.

For framing errors, the key distinction is that 411 is about declaring body length before normal payload handling can begin.

Quick read

Body length must be declared

A 411 means the server expects a valid Content-Length before it will handle the request body normally.

Technical Context

How this status behaves without turning the page into a repair guide.

Request framing

A 411 is narrower than a generic 400 Bad Request. The request may otherwise be well formed, but the server considers the missing or unusable Content-Length value a blocking problem for how the message body is framed and read. In other words, the issue is not the business meaning of the payload but the server rule for how the payload must be declared.

Boundary with other limits

It is also distinct from 413 and 431. A 413 says the body is too large, while a 431 says request header fields are too large. A 411 happens earlier in the framing logic: the server wants a valid body length before it can even evaluate whether the payload size is acceptable under the rest of its limits.

Related HTTP Codes

Nearby HTTP status codes help clarify how 411 differs inside the same response family.

Common Causes

Client omitted Content-Length on a request with a body

The server expects an explicit size declaration before it starts reading a request payload.

Proxy strips or rewrites the Content-Length header

An intermediary changes framing information, leaving the origin with a request body it no longer trusts.

Server policy rejects ambiguous request framing without a fixed body size

The body may exist, but the server requires a deterministic length before normal handling can continue.

Typical Scenarios

01

An HTTP client sends a POST request body but does not include Content-Length where the origin expects it

02

A proxy forwards a request after altering framing headers and the destination refuses the resulting message

03

An upload endpoint requires a known payload length before it will start reading the request body

What To Know

A 411 usually points to request construction, framing policy, or proxy behavior rather than to application content. The relevant signal is that the server wants an explicit and trustworthy body length before normal processing can continue.

Frequently Asked Questions

Common interpretation questions about HTTP 411.

It means the server expects a valid Content-Length header before it will accept the request body for normal processing.

A 411 is about the absence or invalidity of the declared body length. A 413 means the body size is known well enough, but it exceeds the server limit.