What it means
The server requires a Content-Length header and the request did not include one.
Common causes
- Chunked upload to a server that does not accept chunked encoding
- A client library streaming a body without a length
- POST with no body and no Content-Length: 0
How to fix it
As a client or visitor
Send Content-Length (Content-Length: 0 for empty POST bodies) or buffer the body so the client can compute it.
As the site or API owner
Accept chunked transfer encoding where possible, or document that a length is required.
Example response
HTTP/1.1
HTTP/1.1 411 Length Required
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Type: application/problem+json
{
"type": "about:blank",
"title": "Length Required",
"status": 411,
"detail": "Send a Content-Length header with the upload."
} Specification
FAQ
› Why does an empty POST return 411?
Some servers require Content-Length even when there is no body; send Content-Length: 0.
› Does HTTP/2 need Content-Length?
No. HTTP/2 and HTTP/3 frame the body themselves, so 411 is mostly an HTTP/1.1 issue.