Skip to main content
apiguide.dev

HTTP 411 — Length Required

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

Status CodeHTTP 411
CategoryClient Error (4xx)
API Error Subtypes0 error schemas
HTTP Headers1 header

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 Payload Too Large: Fails because the body is too big. 411 fails because the body size was not declared.

Specific API Error Types for 411

No specific Problem+JSON schemas have been defined for HTTP 411 on apiguide.dev yet.

Associated HTTP Headers

Related HTTP Status Codes