Skip to content

Summer of code #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/pyff/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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))

Expand Down
Loading