HTTP 411 status code indicates that a request lacks a
Content-Length HTTP header contains the size of the request body (in bytes) and should be sent with all requests that have a request body. Typically, these are POST, PUT, and PATCH requests.
Content-Length header is ignored when the data
Transfer-Encoding header is present.
Try it yourself
Send a POST request to example.com with an empty body and without a
Content-Length header, and you will receive a
411 Length Required status code:
curl --verbose -X POST https://example.com
Try resending the same request with a
Content-Length header, and you will get a
200 OK response:
curl --verbose -X POST -H 'Content-Length: 0' https://example.com
No spyware, no promotional emails, or keyword-stuffed junk. I will only send you a single email when I've got something interesting to say. Unsubscribe anytime.
You can also subscribe to the Atom feed (it's like RSS, but better).