HTTP 411 Length Required
The server refuses a request with a body but no Content-Length header.
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 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026