HTTP 411 Length Required
The server refuses a request with a body but no Content-Length header.
length requiredContent-Length required Meaning
Some servers and proxies won’t accept chunked transfer encoding for uploads and require the body size up front. It often shows up with empty POST requests or streaming uploads.
Common causes
- POST/PUT with no body and no
Content-Length: 0 - Chunked uploads to a server/proxy that doesn’t support them
- HTTP client library streaming a body of unknown length
⚡ Quick fix
- Send
Content-Length: 0for empty POSTs (curl:-d '') - Buffer the body so the client can compute its length
- Upload to storage with a pre-signed URL that supports chunking
Detailed fix by platform
Linux
- curl:bash
curl -X POST https://api.example.com/jobs/42/start -H 'Content-Length: 0' # or curl -X POST https://api.example.com/jobs/42/start -d ''
How to diagnose
- Headers — Is Content-Length or Transfer-Encoding: chunked sent?
- Body — Empty or streamed?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 12 Oct 2026