HTTP header and message body separator clarification
RFC 2616 (which you shouldn't look at anymore, 7230 is its successor) states:
generic-message = start-line *(message-header CRLF) CRLF [ message-body ]
So there's:
- The start-line, which is either a
Request-Line
or aStatus-Line
, both of which end in CRLF. - Zero or more message-headers, each ending in CRLF.
- A CRLF to denote the end of the start-line and headers.
- Optionally, a message body.
That being said, you don't want to parse HTTP yourself. Use a library for that.
Example (picture source)