def read_http(self, length):
if length is None:<EOL><INDENT>length = len(self)<EOL><DEDENT>if length < <NUM_LIT:9>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>', quiet=True)<EOL><DEDENT>_tlen = self._read_unpack(<NUM_LIT:3>)<EOL>_type = self._read_unpack(<NUM_LIT:1>)<EOL>_flag = self._read_binary(<NUM_LIT:1>)<EOL>_rsid = self._read_binary(<NUM_LIT:4>)<EOL>if _tlen != length:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>', quiet=True)<EOL><DEDENT>if int(_rsid[<NUM_LIT:0>], base=<NUM_LIT:2>):<EOL><INDENT>raise ProtocolError(f'<STR_LIT>', quiet=True)<EOL><DEDENT>http = dict(<EOL>length=_tlen,<EOL>type=_HTTP_TYPE.get(_type),<EOL>sid=int(_rsid[<NUM_LIT:1>:], base=<NUM_LIT:2>),<EOL>packet=self._read_packet(_tlen),<EOL>)<EOL>if http['<STR_LIT:type>'] is None:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>', quiet=True)<EOL><DEDENT>if http['<STR_LIT:type>'] in ('<STR_LIT>', '<STR_LIT>') and http['<STR_LIT>'] != <NUM_LIT:0>:<EOL><INDENT>raise ProtocolError(f'<STR_LIT>', quiet=True)<EOL><DEDENT>_http = _HTTP_FUNC[_type](self, _tlen, _type, _flag)<EOL>http.update(_http)<EOL>return http<EOL>
Read Hypertext Transfer Protocol (HTTP/2).

        Structure of HTTP/2 packet [RFC 7540]:
            +-----------------------------------------------+
            |                 Length (24)                   |
            +---------------+---------------+---------------+
            |   Type (8)    |   Flags (8)   |
            +-+-------------+---------------+-------------------------------+
            |R|                 Stream Identifier (31)                      |
            +=+=============================================================+
            |                   Frame Payload (0...)                      ...
            +---------------------------------------------------------------+

            Octets      Bits        Name                    Description
              0           0     http.length             Length
              3          24     http.type               Type
              4          32     http.flags              Flags
              5          40     -                       Reserved
              5          41     http.sid                Stream Identifier
              9          72     http.payload            Frame Payload