HTTP 411 Length Required — What It Means

What HTTP status code 411 Length Required means, when servers return it, and how to handle it correctly.

Published September 24, 2026

HTTP 411 Length Required means the server refuses the request because it has no Content-Length header and requires one.

What it means

This happens when a client sends a body with chunked encoding to a server that does not accept it.

Common causes: POST without Content-Length; Chunked uploads to strict servers; Misconfigured client.

On the wire

POST /upload HTTP/1.1
HTTP/1.1 411 Length Required
Transfer-Encoding: chunked
A typical 411 exchange.

Practical examples

Test it from the shell

curl -i https://example.com/path   # look for HTTP 411

Handling 411 in code or config

curl -H 'Content-Length: 5' -d 'hello' https://example.com/upload

How to fix it

Send a Content-Length header; Buffer the body before sending; Allow chunked encoding on the server.

1. Reproduce: curl -i <url>
2. Confirm the status is 411
3. Apply the fix above and re-test

Common mistakes

  • Send a Content-Length header
  • Buffer the body before sending
  • Ignoring the response headers that explain the details.

Key takeaways

  • 411 means Length Required.
  • HTTP 411 Length Required means the server refuses the request because it has no Content-Length header and requires one.
  • Read the response headers and logs for the exact cause.

FAQ

When do I see 411?

Mostly with older servers or proxies.

Is 411 a client or server error?

It is a client error status code, in the 4xx class.

More HTTP articles