How do HTTP servers figure out Content-Length?

from blog aarol.dev, | ↗ original
Anyone who has implemented a simple HTTP 1.1 server can tell you that it is a really simple protocol. Basically, it’s a text file that has some specific rules to make parsing it easier. All HTTP requests look something like this: 1 GET /path HTTP/1.1\r\n Host: aarol.dev\r\n Accept-Language: en,fi-FI\r\n Accept-Encoding: gzip, deflate\r\n \r\n The...