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

  1. 1Add a Content-Length header to your request
  2. 2Ensure your HTTP client sets Content-Length automatically
  3. 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