4xx Client Error
HTTP 411 Length Required
The server refuses to accept the request without a defined Content-Length header. The client should include the content length when sending a request body.
Common Causes
- POST/PUT request missing Content-Length header
- Chunked transfer encoding not supported by server
- Proxy stripping the Content-Length header
How to Fix
- 1Add a Content-Length header to your request
- 2Ensure your HTTP client sets Content-Length automatically
- 3Check if proxies are modifying request headers
Example
HTTP 411 Length Required
POST /upload HTTP/1.1 (no Content-Length header) → 411 Length Required
Related Client Error Codes
400
Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
405Method Not Allowed
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
412Precondition Failed
413Content Too Large
414URI Too Long
415Unsupported Media Type
416Range Not Satisfiable
417Expectation Failed
418I'm a Teapot
421Misdirected Request
422Unprocessable Content
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
428Precondition Required
429Too Many Requests
431Request Header Fields Too Large
451Unavailable For Legal Reasons