Very explicitly describe the URL dispatcher sequential search nature #4256
Labels
documentation
Improvements or additions to documentation
Hacktoberfest
We think it's good for https://hacktoberfest.digitalocean.com/
aiohttp tries to match URL to web-handler in the order of resources (routes) addition.
Documentation should be very clear at this point.
For example
/{name}
,/info
always matches to/{name}
,/info
router has no chance to be called.On the opposite,
/info
,/{name}
calls web handler for/{name}
only ifname!='info'
, inother words if/info
handler didn't match.The same is true for sub-apps;
app.add_subapp('/pre', subapp)
matches all/pre/*
paths.In the example above a handler for
/pre/path
is never matched.A champion for documentation upgrade is needed. I don't know where we should put this chapter; this is a subject for discussion.
Related: #4078
The text was updated successfully, but these errors were encountered: