How to identify whether an http request has body or not. Referred this HTTP response headers valid with no Transfer-Encoding and Content-Length?. The request made from swagger ui has body and no content-type. But when checking the request it does not have either transfer encoding header or content-length header. How to identify whether it has a body or not.
Asked
Active
Viewed 398 times
1 Answers
0
Content-Type is entirely irrelevant for this.
The full (complex) algorithm to determine the message size is described in RFC 7230. See https://greenbytes.de/tech/webdav/rfc7230.html#rfc.section.3.3.3.

Julian Reschke
- 40,156
- 8
- 95
- 98