aptdetector/network/parser/httpparser.py
def read_request(self, reader, message):
        """read and output one http request.

        Args:
            reader (DataReader): type of reader that is required
            message (RequestMessage): response packet
        Returns:
            None if error happened , content otherwise
        """
        if message.expect_header and not utils.is_request(reader.fetch_line()):
            req_header = message.expect_header
            message.expect_header = None
        else:
            req_header = self.read_http_req_header(reader)
            if req_header is None:
                # read header error, we skip all data.
                reader.skip_all()
                return None
            if req_header.expect:
                # it is expect:continue-100 post request
                message.expect_header = req_header

        # deal with body
        # if not req_header.chunked:
        #     content = reader.read(req_header.content_len)
        # else:
        #     content = self.read_chunked_body(reader)
        fullUrl = "http://" + str(req_header.host.decode("utf-8")) + str(
            req_header.uri.decode("utf-8"))
        return fullUrl
read and output one http request.

        Args:
            reader (DataReader): type of reader that is required
            message (RequestMessage): response packet
        Returns:
            None if error happened , content otherwise
        
read and output one http request.
read and output one http request .
def read_request(self, reader, message):
        if message.expect_header and not utils.is_request(reader.fetch_line()):
            req_header = message.expect_header
            message.expect_header = None
        else:
            req_header = self.read_http_req_header(reader)
            if req_header is None:
                reader.skip_all()
                return None
            if req_header.expect:
                message.expect_header = req_header
        fullUrl = "http://" + str(req_header.host.decode("utf-8")) + str(
            req_header.uri.decode("utf-8"))
        return fullUrl
def read_request ( self , reader , message ) : if message . expect_header and not utils . is_request ( reader . fetch_line ( ) ) : req_header = message . expect_header message . expect_header = None else : req_header = self . read_http_req_header ( reader ) if req_header is None : reader . skip_all ( ) return None if req_header . expect : message . expect_header = req_header fullUrl = "http://" + str ( req_header . host . decode ( "utf-8" ) ) + str ( req_header . uri . decode ( "utf-8" ) ) return fullUrl
read and output one http request.
read and output one http request .
"""read and output one http request.

        Args:
            reader (DataReader): type of reader that is required
            message (RequestMessage): response packet
        Returns:
            None if error happened , content otherwise
        """ # read header error, we skip all data. # it is expect:continue-100 post request # deal with body # if not req_header.chunked: #     content = reader.read(req_header.content_len) # else: #     content = self.read_chunked_body(reader)
None if error happened , content otherwise
None if error happened content otherwise
self
reader
type of reader that is required
type of reader that is required
message
None