Package wtf :: Package impl :: Package http :: Module _request :: Class RequestInitialState
[hide private]
[frames] | no frames]

Class RequestInitialState

source code

object --+    
         |    
 BaseState --+
             |
            RequestInitialState

Initial state of a request, for example on a fresh connection.

States to go from here:

Instance Methods [hide private]
 
_LINE_MATCH(...)
Regex match callable to check if the line does not start with a WS
source code
 
_VER_MATCH(...)
Regex match callable to parse the HTTP version
source code
tuple
read_request(self)
Read request line
source code

Inherited from BaseState: __init__, finish_headers, read_headers, request_body_stream, response_body_stream, send_continue, send_headers, send_status

Inherited from BaseState (private): _send_continue, _set_state

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
bool response_started = False
Was the response already started?
Instance Variables [hide private]

Inherited from BaseState (private): _request

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_LINE_MATCH(...)

source code 
Regex match callable to check if the line does not start with a WS

_VER_MATCH(...)

source code 
Regex match callable to parse the HTTP version

read_request(self)

source code 
Read request line
Returns: tuple
A tuple of method, url and protocol version (('method', 'url', (major, minor)))
Raises:
Overrides: BaseState.read_request