Bug
1878694 [wpt PR 44398] - Add well-known routes for Protected Audience API WPTs, a=testonly
Automatic update from web-platform-tests
Add well-known routes for Protected Audience API WPTs (#44398)
* Add well-known routes for Protected Audience API WPTs
Web Platform Tests for the [Protected Audience
API](https://github.com/WICG/turtledove/blob/main/FLEDGE.md) are in the
process of being added. As part of this API, the browser issues a GET
request to a well-known URI: `/.well-known/interest-group/permissions/`.
This is described in more detail at
https://github.com/WICG/turtledove/blob/main/FLEDGE.md#13-permission-delegation.
In order to implement dynamic handling of these routes in WPT, we need
to register these routes in the add_mount_point. Because this well-known
URI ends in a '/', we also need special handling for directory-appearing
PythonHandler-supported endpoints.
* Fix indentation in change to handlers.py
* Support default python files matching the pattern default*.py.
In order to support e.g. text substition, which requires a special
filename, e.g. default.sub.py, expand support for loading the default
file in a directory-appearing endpoint handled by a Python handler to
support any default file matching the pattern default*.py. In case
multiple files match this pattern, the first one found is used.
* Improved handling for default files matching default*.py.
* Improved handling for default files matching default*.py.
* Add tests for directory special casing for PythonHandler.
This also makes the directory special casing more deterministic by
explicitly selecting the first lexicographically sorted file match the
default*.py pattern in the requested path.
* Changed AsIsHandler to throw HTTPException instead of AssertionError.
Also added a test that shows AsIsHandler failing when trying to process
a directory.
--
wpt-commits:
fec3221d5d92d6dae1816e688b9b93d3bec855e9
wpt-pr: 44398