def read_http(self, length):
if length is None:<EOL><INDENT>length = len(self)<EOL><DEDENT>packet = self._file.read(length)<EOL>try:<EOL><INDENT>header, body = packet.split(b'<STR_LIT>', <NUM_LIT:1>)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ProtocolError('<STR_LIT>', quiet=True)<EOL><DEDENT>header_unpacked, http_receipt = self._read_http_header(header)<EOL>body_unpacked = self._read_http_body(body) or None<EOL>http = dict(<EOL>receipt=http_receipt,<EOL>header=header_unpacked,<EOL>body=body_unpacked,<EOL>raw=dict(<EOL>header=header,<EOL>body=body,<EOL>packet=self._read_packet(length),<EOL>),<EOL>)<EOL>self.__receipt__ = http_receipt<EOL>return http<EOL>
Read Hypertext Transfer Protocol (HTTP/1.*).

        Structure of HTTP/1.* packet [RFC 7230]:
            HTTP-message    :==:    start-line
                                    *( header-field CRLF )
                                    CRLF
                                    [ message-body ]