wsgiref.handlers.BaseHandler.traceback_limit

traceback_limit The maximum number of frames to include in tracebacks output by the default log_exception() method. If None, all frames are included.

wsgiref.handlers.BaseHandler.os_environ

os_environ The default environment variables to be included in every request’s WSGI environment. By default, this is a copy of os.environ at the time that wsgiref.handlers was imported, but subclasses can either create their own at the class or instance level. Note that the dictionary should be considered read-only, since the default value is shared between multiple classes and instances.

wsgiref.handlers.BaseHandler.origin_server

origin_server This attribute should be set to a true value if the handler’s _write() and _flush() are being used to communicate directly to the client, rather than via a CGI-like gateway protocol that wants the HTTP status in a special Status: header. This attribute’s default value is true in BaseHandler, but false in BaseCGIHandler and CGIHandler.

wsgiref.handlers.BaseHandler.server_software

server_software If the origin_server attribute is set, this attribute’s value is used to set the default SERVER_SOFTWARE WSGI environment variable, and also to set a default Server: header in HTTP responses. It is ignored for handlers (such as BaseCGIHandler and CGIHandler) that are not HTTP origin servers. Changed in version 3.3: The term “Python” is replaced with implementation specific term like “CPython”, “Jython” etc.

wsgiref.handlers.BaseHandler.log_exception()

log_exception(exc_info) Log the exc_info tuple in the server log. exc_info is a (type, value, traceback) tuple. The default implementation simply writes the traceback to the request’s wsgi.errors stream and flushes it. Subclasses can override this method to change the format or retarget the output, mail the traceback to an administrator, or whatever other action may be deemed suitable.

wsgiref.handlers.BaseHandler.get_stderr()

get_stderr() Return an output stream object suitable for use as the wsgi.errors of the request currently being processed.

wsgiref.handlers.BaseHandler.get_scheme()

get_scheme() Return the URL scheme being used for the current request. The default implementation uses the guess_scheme() function from wsgiref.util to guess whether the scheme should be “http” or “https”, based on the current request’s environ variables.

wsgiref.handlers.BaseHandler.error_status

error_status The HTTP status used for error responses. This should be a status string as defined in PEP 3333; it defaults to a 500 code and message.

wsgiref.handlers.BaseHandler.http_version

http_version If origin_server is true, this string attribute is used to set the HTTP version of the response set to the client. It defaults to "1.0".

wsgiref.handlers.BaseHandler.error_output()

error_output(environ, start_response) This method is a WSGI application to generate an error page for the user. It is only invoked if an error occurs before headers are sent to the client. This method can access the current error information using sys.exc_info(), and should pass that information to start_response when calling it (as described in the “Error Handling” section of PEP 3333). The default implementation just uses the error_status, error_headers, and error_body attributes to genera