def guess_payload_class(self, payload):
        try:
            prog = re.compile(
                r"^(?:OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT) "
                r"(?:.+?) "
                r"HTTP/\d\.\d$"
            )
            req = payload[:payload.index("\r\n")]
            result = prog.match(req)
            if result:
                return HTTPRequest
            else:
                prog = re.compile(r"^HTTP/\d\.\d \d\d\d .+?$")
                result = prog.match(req)
                if result:
                    return HTTPResponse
        except:
            pass
        return Packet.guess_payload_class(self, payload)
Decides if the payload is an HTTP Request or Response, or
dataset/ETHPy150Open catalyst256/gobbler/gobbler/layers/http.py/HTTP.guess_payload_class