Change the behavior of url dispatching with quote characters.#414
Conversation
aiohttp/web_reqrep.py
Outdated
There was a problem hiding this comment.
Use @reofy instead of @property
|
Please fix my inline notes and add doc for |
|
I'm not sure we want to make this behavior the default one and according to #351 (comment) it's the RFC behavior that we may want to make the default one. I will fix the other notes. |
|
@kxepal would you join to discussion?
Does my proposal make sense? |
|
@asvetlov absolutely. +1 for that. |
HISTORY.rst
Outdated
There was a problem hiding this comment.
You need to modify CHANGES.rst instead. 0.17.0 is an upcoming release, not the archived one.
b59af6e to
003c4ad
Compare
|
I've made the changes and update the commit message + PR description. |
The quoted characters of the URL will not be significant during url dispatching
but will be decoded after the matching.
For example, with this route:
```
@asyncio.coroutine
def handler(request):
return web.Response(body=repr(request.match_info))
app = Application(loop=loop)
app.router.add_route('GET', '/{route}', handler)
```
The following query will generate this match_info:
```
curl -I http://127.0.0.1:8080/route%2Fslash
HTTP/1.1 200 OK
...
<MatchInfo {'route': 'route/slash'}: <DynamicRoute [*] /{route} -> <function handler at 0x10b888158>>
```
003c4ad to
2f1d33c
Compare
|
Thanks |
The quoted characters of the URL will not be significant during url dispatching
but will be decoded after the matching.
For example, with this route:
The following query will generate this match_info: