Skip to content

Commit 5bc66ef

Browse files
committed
Don't loose track of trailing slashes
Slashses might be part of the entityID Related to #298
1 parent 62fe3e2 commit 5bc66ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pyff/api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ def _d(x: Optional[str], do_split: bool = True) -> tuple[Optional[str], Optional
205205
# Ugly workaround bc WSGI drops double-slashes.
206206
path = path.replace(':/', '://')
207207

208+
# Ugly workaround bc request.matchdict drops trailing slashes which could be part of the entityID
209+
if request.path and request.path[-1] == "/":
210+
path = path + "/"
211+
208212
msg = "handling entry={}, alias={}, path={}"
209213
log.debug(msg.format(entry, alias, path))
210214

0 commit comments

Comments
 (0)