mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Handle tables%2fwith%2fslashes
This commit is contained in:
parent
4b6b409d85
commit
1208bcbfe8
1 changed files with 3 additions and 1 deletions
|
|
@ -17,8 +17,10 @@ class AsgiRouter:
|
|||
]
|
||||
|
||||
async def __call__(self, scope, receive, send):
|
||||
# Because we care about "foo/bar" v.s. "foo%2Fbar" we decode raw_path ourselves
|
||||
path = scope["raw_path"].decode("ascii")
|
||||
for regex, view in self.routes:
|
||||
match = regex.match(scope["path"])
|
||||
match = regex.match(path)
|
||||
if match is not None:
|
||||
new_scope = dict(scope, url_route={"kwargs": match.groupdict()})
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue