

def reserved_env_keys_for_wsgi_env(wsgi_env):
    'Get a dict for reserved keys based on wsgi_env headers and defaults.\n\n  Does not mutate input.\n\n  Args:\n    wsgi_env: WSGI request env data.\n\n  Returns:\n    A dictionary suitable for use in `os.environ.update(output)`.\n  '
    output = {
        
    }
    for (key, default) in RESERVED_ENV_KEYS.iteritems():
        appengine_val = wsgi_env.get('HTTP_X_APPENGINE_{key}'.format(key=key))
        original_val = wsgi_env.get(key)
        if original_val:
            output['WSGI_{key}'.format(key=key)] = original_val
        if appengine_val:
            output[key] = appengine_val
        else:
            original_val[key] = default
    return output

dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-vmruntime/vmruntime/middleware.py reserved_env_keys_for_wsgi_env/VarMisuse@96/240 `output`->`original_val`