Package wtf :: Package impl :: Package http :: Module _server :: Class Gateway
[hide private]
[frames] | no frames]

Class Gateway

source code

      object --+    
               |    
_gateway.Gateway --+
                   |
                  Gateway

HTTP implementation specific gateway
Instance Methods [hide private]
 
_NORM_SUB(...)
Regex substitution callable for norming HTTP header names
source code
 
_SLASH_SPLIT(...)
Regex splitter callable for encoded slashes
source code
dict
_populate_base_env(self, base_env)
Add HTTP implementation specific env constants
source code
dict
_init_from_request(self, connection, request)
Create HTTP implementation specific request environment
source code

Inherited from _gateway.Gateway: __init__, handle

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

Class Variables [hide private]
tuple _STRIPPED = ('HTTP_CONTENT_TYPE', 'HTTP_CONTENT_LENGTH')
List of HTTP variable names, which are expected to appear without the HTTP_ prefix
set _HOPS = set(['HTTP_CONNECTION', 'HTTP_KEEP_ALIVE', 'HTTP_PROXY...
Set of standard Hop-by-Hop headers
Instance Variables [hide private]

Inherited from _gateway.Gateway: args, config, opts

Inherited from _gateway.Gateway (private): _baseenv

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_SLASH_SPLIT(...)

source code 
Regex splitter callable for encoded slashes

_populate_base_env(self, base_env)

source code 
Add HTTP implementation specific env constants
Parameters:
  • base_env - The base environment so far
Returns: dict
The modified base_env (maybe the same dict as passed in)
Overrides: _gateway.Gateway._populate_base_env

_init_from_request(self, connection, request)

source code 
Create HTTP implementation specific request environment
Parameters:
  • connection - The connection the request is handled on
  • request - The request instance
Returns: dict
A tuple of the request env and a specific response starter (`(dict, callable))
Overrides: _gateway.Gateway._init_from_request

Class Variable Details [hide private]

_HOPS

Set of standard Hop-by-Hop headers
Type:
set
Value:
set(['HTTP_CONNECTION',
     'HTTP_KEEP_ALIVE',
     'HTTP_PROXY_AUTHENTICATE',
     'HTTP_PROXY_AUTHORIZATION',
     'HTTP_TE',
     'HTTP_TRAILERS',
     'HTTP_TRANSFER_ENCODING',
     'HTTP_UPGRADE'])