Skip to main content

Client Error (4xx)

HTTP/1.1

411 Length Required

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

CategoryClient Error (4xx)
API error types1 error schema
Related headers1 header
Updated2026-10-14

What does HTTP status code 411 mean?

The 411 Length Required status code indicates that the server rejects the request because it requires a Content-Length header to safely allocate buffers for the request body.

When to use it in APIs

Typically enforced on file upload or ingestion routes to prevent memory exhaustion attacks.

How it compares to other codes

  • 413 Content Too Large: Fails because the body is too big. 411 fails because the body size was not declared.

Problem types for 411

1