aptdetector/network/parser/httpparser.py
def finish(self):
        """if still have unprocessed data then process them"""
        if self.cur_data:
            reader = DataReader(self.cur_data)
            if self.cur_type == HttpType.REQUEST:
                pkt = self.read_request(reader, self.message)
                if pkt is not None:
                    return pkt
            elif self.cur_type == HttpType.RESPONSE:
                self.read_response(reader, self.message)
        return None
if still have unprocessed data then process them
if still have unprocessed data then process them
if still have unprocessed data then process them
def finish(self):
        if self.cur_data:
            reader = DataReader(self.cur_data)
            if self.cur_type == HttpType.REQUEST:
                pkt = self.read_request(reader, self.message)
                if pkt is not None:
                    return pkt
            elif self.cur_type == HttpType.RESPONSE:
                self.read_response(reader, self.message)
        return None
def finish ( self ) : if self . cur_data : reader = DataReader ( self . cur_data ) if self . cur_type == HttpType . REQUEST : pkt = self . read_request ( reader , self . message ) if pkt is not None : return pkt elif self . cur_type == HttpType . RESPONSE : self . read_response ( reader , self . message ) return None
if still have unprocessed data then process them
if still have unprocessed data then process them
"""if still have unprocessed data then process them"""
self