Q:

HTTP header and message body separator clarification

I'm going to be parsing metadata that will have the same format that HTTP headers/messages do. 
I was reading RFC 2616 and I'm trying to understand this more clearly. 
Is each HTTP header separated by CRLF (\r\n) and then the separator between the headers and the message body CRLFCRLF(\r\n\r\n)?  I couldn't find (or maybe I missed it) anything that detailed what the standard was. 
Thanks. 

A:

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 a Status-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)

