Ejemplo n.º 1
0
    def __init__(self, latency, payload):
        self.latency = round(int(latency) / 1000000000, 3)
        self.payload = payload

        self.response_line, self.raw_headers, self.body = util.http_split_message(payload)
        self.headers = util.http_parse_headers(self.raw_headers)
        self.version, self.status_code, self.reason = self.response_line.partition(' ')
Ejemplo n.º 2
0
    def __init__(self, latency, payload):
        self.latency = latency
        self.payload = payload

        self.response_line, raw_headers, self.body = util.http_split_message(
            payload)
        self.headers = util.http_parse_headers(raw_headers)
        self.version, self.status_code, self.reason = self.response_line.split(
            ' ', 2)
Ejemplo n.º 3
0
    def __init__(self, timestamp, payload):
        self.timestamp = round(int(timestamp) / 1000000000, 3)
        self.payload = payload

        self.request_line, raw_headers, self.body = util.http_split_message(payload)
        self.raw_headers = util.hack_gor_real_ip(raw_headers)
        self.headers = util.http_parse_headers(self.raw_headers)
        self.method, self.url, self.version = self.request_line.split(' ')

        self.host = self.headers.get('host', 'n/a')
        self.path, _, self.query = self.url.partition('?')