You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python sub_app_cbv.py just_app_with_routes_def
Going to run just_app_with_routes_def
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
$ python sub_app_cbv.py sub_app_after_routes_def
Going to run sub_app_after_routes_def
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
$ python sub_app_cbv.py sub_app_before_routes_def
Going to run sub_app_before_routes_def
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
$ http :8080/api/v1/ping/
HTTP/1.1 404 Not Found
Content-Length: 14
Content-Type: text/plain; charset=utf-8
Date: Thu, 11 Jan 2018 23:21:41 GMT
Server: Python/3.6 aiohttp/2.3.7
404: Not Found
Steps to reproduce
See above.
Your environment
Gentoo laptop, pyenv, 3.6. Not really env-related.
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that new issue.
Long story short
If one adds routes to subapp before
app.add_subapp
accessing them works well, otherwise it results in 404.Expected behaviour
It's naturally expected that routing will work well regardless of the order of function calls.
Actual behaviour
Given
sub_app_cbv.py
:Demo 1
$ http :8080/api/v1/ping/ HTTP/1.1 200 OK Content-Length: 4 Content-Type: text/plain; charset=utf-8 Date: Thu, 11 Jan 2018 23:17:52 GMT Server: Python/3.6 aiohttp/2.3.7 pong
Demo 2
$ http :8080/api/v1/ping/ HTTP/1.1 200 OK Content-Length: 4 Content-Type: text/plain; charset=utf-8 Date: Thu, 11 Jan 2018 23:20:58 GMT Server: Python/3.6 aiohttp/2.3.7 pong
Demo 3
$ http :8080/api/v1/ping/ HTTP/1.1 404 Not Found Content-Length: 14 Content-Type: text/plain; charset=utf-8 Date: Thu, 11 Jan 2018 23:21:41 GMT Server: Python/3.6 aiohttp/2.3.7 404: Not Found
Steps to reproduce
See above.
Your environment
Gentoo laptop, pyenv, 3.6. Not really env-related.
The text was updated successfully, but these errors were encountered: