

def make_environ(self):
    request_url = url_parse(self.path)

    def shutdown_server():
        self.server.shutdown_signal = True
    url_scheme = (((self.server.ssl_context is None) and 'http') or 'https')
    path_info = url_unquote(request_url.path)
    environ = {
        'wsgi.version': (1, 0),
        'wsgi.url_scheme': url_scheme,
        'wsgi.input': self.rfile,
        'wsgi.errors': sys.stderr,
        'wsgi.multithread': self.server.multithread,
        'wsgi.multiprocess': self.server.multiprocess,
        'wsgi.run_once': False,
        'werkzeug.server.shutdown': shutdown_server,
        'SERVER_SOFTWARE': request_url.server_version,
        'REQUEST_METHOD': self.command,
        'SCRIPT_NAME': '',
        'PATH_INFO': wsgi_encoding_dance(path_info),
        'QUERY_STRING': wsgi_encoding_dance(request_url.query),
        'CONTENT_TYPE': self.headers.get('Content-Type', ''),
        'CONTENT_LENGTH': self.headers.get('Content-Length', ''),
        'REMOTE_ADDR': self.client_address[0],
        'REMOTE_PORT': self.client_address[1],
        'SERVER_NAME': self.server.server_address[0],
        'SERVER_PORT': str(self.server.server_address[1]),
        'SERVER_PROTOCOL': self.request_version,
    }
    for (key, value) in self.headers.items():
        key = ('HTTP_' + key.upper().replace('-', '_'))
        if (key not in ('HTTP_CONTENT_TYPE', 'HTTP_CONTENT_LENGTH')):
            environ[key] = value
    if request_url.netloc:
        environ['HTTP_HOST'] = request_url.netloc
    return environ

dataset/ETHPy150Open Eforcers/gae-flask-todo/lib/werkzeug/serving.py WSGIRequestHandler.make_environ/VarMisuse@127/200 `self`->`request_url`