Package core :: Package controllers :: Package daemons :: Module proxy :: Class HTTPServerWrapper
[hide private]

Class HTTPServerWrapper





This is a dummy wrapper around HTTPServer.
It is intended to be used only through process_request() method
It also has chainedHandler attribute, which refers to a handler instance 
that was created to handle CONNECT method.

Client                              Proxy                               Server                  
   |                                  |                                   |
   | -- CONNECT http://host:port ---> |                                   |
   | <---------- 200 OK ------------  |                                   |
   | -------- Handshake ------------- |                                   |
   |                                  | -- create --> Wrapped Proxy       |
   |                                  |                     |             |
   | --------- (Over SSL) GET /path?params ---------------> |             |
   |                                  | <--- Get info ----  |             |  
   |                                  |                     | --- GET --> | 

Due to the wrapper object, the second (wrapped) proxy know almost nothing about
SSL and works just as with plain sockets.
Examples of what a second proxy handler would want to know from the original
one is the CONNECT method path or urlOpener (see spiderMan).



Instance Methods [hide private]
 
__init__(self, handler, chainedHandler)
Constructor.

Inherited from BaseHTTPServer.HTTPServer: server_bind

Inherited from SocketServer.TCPServer: close_request, fileno, get_request, server_activate, server_close

Inherited from SocketServer.BaseServer: finish_request, handle_error, handle_request, process_request, serve_forever, verify_request

Inherited from SocketServer.ThreadingMixIn: process_request_thread

Class Variables [hide private]

Inherited from BaseHTTPServer.HTTPServer: allow_reuse_address

Inherited from SocketServer.TCPServer: address_family, request_queue_size, socket_type

Inherited from SocketServer.ThreadingMixIn: daemon_threads

Method Details [hide private]

__init__(self, handler, chainedHandler)
(Constructor)

 
Constructor. May be extended, do not override.
Overrides: SocketServer.TCPServer.__init__
(inherited documentation)