Public Member Functions | |
def | __init__ |
def | ParseAdditionalData |
def | were_all_requests_http_1_1 |
Static Public Attributes | |
tuple | HEADER_RE = re.compile('([^:]+):(.*)\n') |
int | LOOKING_FOR_GET = 1 |
int | READING_HEADERS = 2 |
tuple | REQUEST_RE = re.compile('([^ ]+) ([^ ]+) HTTP/(\d+)\.(\d+)\n') |
Private Member Functions | |
def | _DoLookForGet |
def | _DoReadHeader |
Private Attributes | |
_buffer | |
_pending_headers | |
_pending_request | |
_state | |
_valid_requests | |
_were_all_requests_http_1_1 |
Parses an input buffer looking for HTTP GET requests.
Definition at line 67 of file http_pipe.py.
def http_pipe.RequestParser.__init__ | ( | self | ) |
Initializer.
Definition at line 78 of file http_pipe.py.
def http_pipe.RequestParser._DoLookForGet | ( | self | ) | [private] |
Tries to parse an HTTTP request line. Returns: (Boolean) True if a request was found. Raises: UnexpectedMethodError: On a non-GET method.
Definition at line 126 of file http_pipe.py.
def http_pipe.RequestParser._DoReadHeader | ( | self | ) | [private] |
Tries to parse a HTTP header. Returns: (Boolean) True if it found the end of the request or a HTTP header.
Definition at line 155 of file http_pipe.py.
def http_pipe.RequestParser.ParseAdditionalData | ( | self, | |
data | |||
) |
Finds HTTP requests in |data|. Args: data: (String) Newly received input data from the socket. Returns: (List of Tuples) (String) The request path. (Map of String to String) The header name and value. Raises: RequestTooLargeError: If the request exceeds MAX_REQUEST_SIZE. UnexpectedMethodError: On a non-GET method. Error: On a programming error.
Definition at line 87 of file http_pipe.py.
Definition at line 123 of file http_pipe.py.
http_pipe.RequestParser::_buffer [private] |
Definition at line 78 of file http_pipe.py.
Definition at line 78 of file http_pipe.py.
Definition at line 78 of file http_pipe.py.
http_pipe.RequestParser::_state [private] |
Definition at line 78 of file http_pipe.py.
http_pipe.RequestParser::_valid_requests [private] |
Definition at line 78 of file http_pipe.py.
Definition at line 78 of file http_pipe.py.
tuple http_pipe.RequestParser::HEADER_RE = re.compile('([^:]+):(.*)\n') [static] |
Definition at line 75 of file http_pipe.py.
int http_pipe.RequestParser::LOOKING_FOR_GET = 1 [static] |
Definition at line 72 of file http_pipe.py.
int http_pipe.RequestParser::READING_HEADERS = 2 [static] |
Definition at line 73 of file http_pipe.py.
tuple http_pipe.RequestParser::REQUEST_RE = re.compile('([^ ]+) ([^ ]+) HTTP/(\d+)\.(\d+)\n') [static] |
Definition at line 76 of file http_pipe.py.