# 411 Length Required

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

Source: https://apiguide.dev/status-codes/411
Class: client-error
Defined in: RFC 9110, Section 15.5.12 <https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.12>
Updated: 2026-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.
