At One Place

HTTP 411 — Length Required

HTTP 411
Length Required
The server refuses to accept a request body without a Content-Length header.

What 411 actually means

The server needs to know up front how many bytes are coming and the client did not say. This usually means the client sent a body using chunked transfer encoding against a server that will not accept it, or omitted `Content-Length` altogether. It is a small, mechanical error — add the header and the request works — and most HTTP libraries set it for you, so it points at hand-rolled requests or an unusual proxy.

Common causes

  • A request with a body but no `Content-Length` header
  • Chunked transfer encoding sent to a server or proxy that requires a known length
  • A hand-built HTTP request, often in a script or a raw socket client
  • A streaming upload to an endpoint that will not accept one

If you're just trying to view the page

  1. Nothing you can act on — this is a client-side or tooling problem, not a browser one
  2. If a desktop application produced it, check for an update or report it

If it's your site

  1. Set `Content-Length` explicitly, or let your HTTP library compute it by passing a buffer rather than a stream
  2. If you need streaming uploads, confirm every proxy in the path supports chunked encoding
  3. On the server, accept chunked bodies where you can rather than rejecting them outright

Reference

Status code
411
Reason phrase
Length Required
Category
4xx — Client Error
Defined in
RFC 9110 §15.5.12

Common questions

What does HTTP 411 mean?
The server refuses to accept a request body without a Content-Length header. The server needs to know up front how many bytes are coming and the client did not say. This usually means the client sent a body using chunked transfer encoding against a server that will not accept it, or omitted `Content-Length` altogether.
How do I fix a 411 error?
Nothing you can act on — this is a client-side or tooling problem, not a browser one
Is 411 a client error or a server error?
411 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.

Related pages

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked