Reputation: 8027
I am implementing a web server and I was wondering how to treat request messages with a message body but without Transfer-Encoding
nor Content-Length
headers (assuming the request method is not HEAD nor CONNECT of course).
According to RFC 7230, § 3.3.3. Message Body Length:
The length of a message body is determined by one of the following (in order of precedence):
[…]
- If this is a request message and none of the above are true, then the message body length is zero (no message body is present).
Am I in that case, and consequently should I consider the message body length is zero (even though it is not zero in reality)?
Upvotes: 0
Views: 49
Reputation: 41997
The spec defines it. If there is no content-length nor chunked encoding, whatever follows the header section is the next request (possibly malformed).
Upvotes: 1