Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
http_pipe.RequestParser Class Reference

List of all members.

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

Detailed Description

Parses an input buffer looking for HTTP GET requests.

Definition at line 67 of file http_pipe.py.


Constructor & Destructor Documentation

Initializer.

Definition at line 78 of file http_pipe.py.


Member Function Documentation

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.


Member Data Documentation

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.

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.

tuple http_pipe.RequestParser::HEADER_RE = re.compile('([^:]+):(.*)\n') [static]

Definition at line 75 of file http_pipe.py.

Definition at line 72 of file http_pipe.py.

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.


The documentation for this class was generated from the following file:


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:11