4xx Client errors
Last updated Jun 09, 2026

What is HTTP Status Code 411? - Length Required

Benjamin Bouchet
Benjamin Bouchet
Get your free
Abstract
 API key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
START FOR FREE
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required

The HTTP Status Code 411 means that the request did not specify the length of its content, which is required by the server to access the requested resource.

Frequently Asked Questions

What does HTTP 411 mean?

HTTP 411 Length Required is a client error status code indicating the server refused to process the request because the Content-Length header was missing. The server requires this header to know how many bytes of data are being transmitted in the request body before it will fulfill the request.

When does a server return a 411 error?

A server returns a 411 when a client sends a request — most commonly a POST or PUT request — without including a Content-Length header. It can also occur when the declared Content-Length value does not accurately reflect the actual size of the request body being sent.

How do I fix an HTTP 411 error?

To fix a 411 error, add a Content-Length header to your request and set its value to the exact byte size of the request body. Many HTTP client tools such as curl and Postman will set this header automatically when you provide a request body, so switching to one of these tools can resolve the issue without manual header management.

Does HTTP 411 apply to chunked transfer encoding?

When using chunked transfer encoding, the Content-Length header is intentionally omitted from the overall request, and instead the length of each individual chunk is included in hexadecimal format at the start of that chunk. Some servers do not support chunked encoding and will return a 411 in this case, requiring you to send the full body with a Content-Length header instead.

What is the difference between HTTP 411 and HTTP 400?

Both are 4xx client error codes, meaning the problem originates from the request rather than the server. HTTP 400 Bad Request is a general error for malformed or invalid requests, while HTTP 411 is a specific error indicating only that the Content-Length header is absent. If your request body is present but the header is missing, you will receive a 411 rather than a 400.

Why do servers enforce the Content-Length header?

Requiring clients to declare payload size upfront allows the server to allocate resources appropriately and helps protect against certain forms of request abuse. Without a known content length, a server cannot reliably determine when a request body ends, which can create processing and security issues.

Get your free
API
key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required