def __init__(self, tcpdir, pointer):
        message.Message.__init__(self, tcpdir, pointer, dpkt_http.Response)
        # get mime type
        if 'content-type' in self.msg.headers:
            self.mediaType = MediaType(self.msg.headers['content-type'])
        else:
            self.mediaType = MediaType('application/x-unknown-content-type')
        self.mimeType = self.mediaType.mimeType()
        # first guess at body size. handle_compression might
        # modify it, but this has to be before clear_body
        self.body_length = len(self.msg.body)
        self.compression_amount = None
        self.text = None
        # handle body stuff
        if settings.drop_bodies:
            self.clear_body()
        else:
            # uncompress body if necessary
            self.handle_compression()
            # try to get out unicode
            self.handle_text()
dataset/ETHPy150Open andrewf/pcap2har/pcap2har/http/response.py/Response.__init__/original