We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f635bd6 commit 8ee0ba8Copy full SHA for 8ee0ba8
aikido_zen/helpers/try_parse_url_path.py
@@ -28,8 +28,10 @@ def try_parse_url_path(url):
28
if parsed.path == "":
29
return "/"
30
31
- # Multiple slashes are ignored in python, so we want to also remove them here
32
- # This allows the route building & endpoint matching to work properly.
33
- normalized_path = re.sub(r"/+", "/", parsed.path)
+ normalized_path = parsed.path
+ if "//" in normalized_path:
+ # Multiple slashes are ignored in python, so we want to also remove them here
34
+ # This allows the route building & endpoint matching to work properly.
35
+ normalized_path = re.sub(r"/+", "/", normalized_path)
36
37
return normalized_path
0 commit comments