Update PATH_INFO when prefix is configured in wsgi (#722)
Some checks failed
test / linux (3.10) (push) Has been cancelled
test / linux (3.11) (push) Has been cancelled
test / linux (3.12) (push) Has been cancelled
test / linux (3.13) (push) Has been cancelled
test / linux (3.14) (push) Has been cancelled
test / linux (pypy3.11) (push) Has been cancelled
test / linux (3.13t) (push) Has been cancelled
test / linux (3.14t) (push) Has been cancelled
test / macos (3.10) (push) Has been cancelled
test / macos (3.11) (push) Has been cancelled
test / macos (3.12) (push) Has been cancelled
test / macos (3.13) (push) Has been cancelled
test / macos (3.14) (push) Has been cancelled
test / macos (3.13t) (push) Has been cancelled
test / macos (3.14t) (push) Has been cancelled
test / windows (3.10) (push) Has been cancelled
test / windows (3.11) (push) Has been cancelled
test / windows (3.12) (push) Has been cancelled
test / windows (3.13) (push) Has been cancelled
test / windows (3.13t) (push) Has been cancelled
test / windows (3.14) (push) Has been cancelled
test / windows (3.14t) (push) Has been cancelled

This commit is contained in:
Giovanni Barillari 2025-10-29 19:09:07 +01:00 committed by GitHub
parent 5cb7dd8d87
commit b6e95b5ea1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,6 +48,9 @@ def _callback_wrapper(callback: Callable[..., Any], scope_opts: Dict[str, Any],
def _runner(proto, scope):
resp = Response()
scope.update(basic_env)
if scope['SCRIPT_NAME']:
scope['PATH_INFO'] = scope['PATH_INFO'][len(scope['SCRIPT_NAME']) :] or '/'
rv = callback(scope, resp)
if isinstance(rv, list):