Overview

You forgot the Content-Length header.

Takeaways

  1. The server refuses to accept the request without a defined Content-Length.
  2. The client may repeat the request if it adds a valid Content-Length header field containing the length of the message body in the request message.

Information

Note

When sending data in a series of chunks, the Content-Length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format. Refer to the Transfer-Encoding header.

Further Reading

Specification

411 Length Required | The HTTP Working Group

411 Length Required

MDN web docs

Content-Length header field

MDN web docs

Transfer-Encoding header field

MDN web docs