411 Length Required
Meaning
The server refuses to accept the request without a defined Content-Length header.
When to Use
When the server requires a Content-Length header in the request (often in POST/PUT) and the client has not sent it.
Example
If a client sends a POST with chunked transfer encoding or no Content-Length where it's mandated, the server can respond with 411 Length Required to indicate the client must specify the length.
When Not to Use
Do not use if the length is provided or not needed. This is specific to situations where knowing the content length is required by the server to process the request.
Source
RFC 9110