class wsgiref.simple_server.WSGIRequestHandler(request, client_address, server)
Create an HTTP handler for the given request (i.e. a socket), client_address (a (host,port)
tuple), and server (WSGIServer
instance).
You do not need to create instances of this class directly; they are automatically created as needed by WSGIServer
objects. You can, however, subclass this class and supply it as a handler_class to the make_server()
function. Some possibly relevant methods for overriding in subclasses:
-
get_environ()
-
Returns a dictionary containing the WSGI environment for a request. The default implementation copies the contents of the
WSGIServer
object’sbase_environ
dictionary attribute and then adds various headers derived from the HTTP request. Each call to this method should return a new dictionary containing all of the relevant CGI environment variables as specified in PEP 3333.
-
get_stderr()
-
Return the object that should be used as the
wsgi.errors
stream. The default implementation just returnssys.stderr
.
-
handle()
-
Process the HTTP request. The default implementation creates a handler instance using a
wsgiref.handlers
class to implement the actual WSGI application interface.
Please login to continue.