HTTP Status Codes / 4xx HTTP Status Codes / HTTP 411

411 Length Required

This is an educational reference page about HTTP 411 Length Required. The page itself is served as 200 OK so it can be indexed as HTTP documentation.

The request did not specify the length of its content, which is required by the requested resource.

What it means

HTTP 411 Length Required means the server refuses the request because it requires a Content-Length header.

Common causes

Where you see it

Headers involved

How to fix it

Client fixes

Server fixes

Example response

HTTP/1.1 411 Length Required
Content-Type: application/json

{"error":"Content-Length header required"}

Developer notes

411 is about request framing, not validation of the body contents. If the body is present but invalid, 400 or 422 is usually more accurate.

Questions

What does HTTP 411 mean?

HTTP 411 means the server requires the request to include Content-Length before it will process the body.

How do I fix 411 Length Required?

Send a correct Content-Length header or adjust the client/proxy so the origin receives supported request framing.

Related comparisons

4xx client error – the request contains bad syntax or cannot be fulfilled


HTTP status code lookup
By Ping Now, a website/API/service uptime monitor
Data from Wikipedia