loot.tools
411

Length Required

4xx Client Error

The server requires a Content-Length header that wasn't provided.

411 Length Required means the server refuses the request because it can't tell how big the body is: there's no Content-Length header and it won't accept chunked transfer encoding. It tends to show up with streaming uploads passing through older proxies or servers that insist on knowing the size up front.

What 411 looks like on the wire

POST /upload HTTP/1.1
Host: example.com
Transfer-Encoding: chunked

HTTP/1.1 411 Length Required

About 4xx Client Error

The request has a problem the client needs to fix, like a bad URL, missing auth, or invalid input.

How to fix 411 Length Required

  • Send a Content-Length header with the exact size of the body.
  • Turn off chunked transfer encoding if the server can't handle it.
  • If the body is generated on the fly, buffer it first so the length is known before sending.

Where it's defined

411 Length Required is defined in RFC 9110 §15.5.12. MDN's 411 reference covers browser behavior and examples.

Looking for a different one? See the full HTTP status code reference.