diff --git a/src/pyff/api.py b/src/pyff/api.py index 10e7b3ad..eb49e805 100644 --- a/src/pyff/api.py +++ b/src/pyff/api.py @@ -140,7 +140,7 @@ def request_handler(request: Request) -> Response: :param request: the HTTP request object :return: the data to send to the client """ - key = request.path_qs + key = f"{request.path_qs}_{request.accept}" r = None try: r = request.registry.cache[key] @@ -205,6 +205,10 @@ def _d(x: Optional[str], do_split: bool = True) -> tuple[Optional[str], Optional # Ugly workaround bc WSGI drops double-slashes. path = path.replace(':/', '://') + # Ugly workaround bc request.matchdict drops trailing slashes which could be part of the entityID + if request.path and request.path[-1] == "/": + path = path + "/" + msg = "handling entry={}, alias={}, path={}" log.debug(msg.format(entry, alias, path))