-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
custom regex
of router should support \s
of the pattern
#6619
Comments
custom regex
should support \s
of the patterncustom regex
of router should support \s
of the pattern
Also, if the URL has special (like |
I think spaces are typically discouraged in URLs, which is why this probably hasn't come up before. If you can come with an easy fix though, I'm sure we can consider merging it. |
say if the url is a totally valid file path and contains like How about coroutine resolve(request) use |
I don't have time to take a look at the moment. But, I'd suggest trying the change and running the test suite, that will likely tell you if there are problems with the solution. |
Describe the bug
router like
/{fn:\w+ \d+}
or/{fn:\w+\s\d+}
can't match path like/abc 123
,because of the coroutine resolve(request) uses raw_path, which is
/abc%20123
and needs pattern like/{fn:\w+%20\d+}
.Usually, users will write
or
\s
for a pattern instead of%20
Python Version
aiohttp Version
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: