Troubleshooting guide · http-status · Published 2026-08-16 · 4 min read

HTTP 411 Length Required explained

Understand the HTTP 411 Length Required status, why Content-Length is needed, and how to fix the request.

The 411 Length Required status is a 4xx client error defined in the HTTP specification. It means the server refused a request because it was missing the Content-Length header that tells the server how many bytes the request body will contain. It is one of the least common status codes in practice, because most clients and servers add this header automatically, but it appears when a hand-written request or a broken proxy chain forgets it.

What it means

For an HTTP request with a body, the client normally sends a Content-Length header giving the exact size of the body in bytes, so the server knows how much to read before the request ends. A 411 response says that the server needs that header and does not have it. The client is allowed to repeat the request, this time including a valid Content-Length.

The usual exception is chunked transfer encoding. When a client sends a body in chunks, it omits Content-Length and instead marks the transfer as Transfer-Encoding: chunked, putting each chunk's length in each chunk. A server that accepts chunked bodies will not return 411 for that format, because the framing is provided differently. A 411 appears when neither Content-Length nor chunked framing is present or recognised.

Common causes

Several situations produce 411, most of them involving nonstandard clients rather than browsers, which handle this correctly:

Browsers and standard HTTP libraries set these automatically, so a 411 you see in normal web browsing is almost always coming from an API, an upload, an integration between services, or a private request you issued directly rather than a visitor with an ordinary browser.

How to fix it

Approach it by reproducing the exact failing request and inspecting its headers. Use the network panel of the developer tools or a tool that shows raw request headers, and look for whether the body is missing its length.

A check after the fix is to repeat the request and confirm it returns the expected success or application-level status rather than 411. If the request still fails, see 400 bad request for the malformed side and 413 payload too large for the server refusing the body once the length is accepted.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services