'Ensure certain values are present, if required by WSGI.'

def _sanitizeEnv(self, environ):

    if (not environ.has_key('SCRIPT_NAME')):
        environ['SCRIPT_NAME'] = ''
    if (not environ.has_key('PATH_INFO')):
        environ['PATH_INFO'] = ''
    for (name, default) in [('REQUEST_METHOD', 'GET'), ('SERVER_NAME', 'localhost'), ('SERVER_PORT', '80'), ('SERVER_PROTOCOL', 'HTTP/1.0')]:
        if (not environ.has_key(name)):
            environ['wsgi.errors'].write(('%s:    missing    FastCGI    param    %s    required    by    WSGI!\n' % (self.__class__.__name__, name)))
            environ[name] = default
