#NEWLINE# def _parseOutHeaders( self , content ) : #NEWLINE# #INDENT# '\n        Parse the headers out of some web content.\n\n        @param content: Bytes received from a web server.\n        @return: A tuple of (requestLine, headers, body). C{headers} is a dict\n            of headers, C{requestLine} is the first line (e.g. "POST /foo ...")\n            and C{body} is whatever is left.\n        ' #NEWLINE# ( headers , body ) = content . split ( b'\r\n\r\n' ) #NEWLINE# headers = headers . split ( b'\r\n' ) #NEWLINE# requestLine = headers . pop ( 0 ) #NEWLINE# return ( requestLine , dict ( ( header . split ( b': ' ) for header in headers ) ) , body )