On Thu, Feb 18, 2016 at 12:05 PM, Thomas De Schampheleire < [email protected]> wrote: > > Thanks, for basic 404 it indeed works. > However, I discovered at least one scenario where it does not: >
Thanks for pointing that out. The reason is that when dispatching errors we do not pass through the middleware stack again, so RoutesMiddleware is not executed again and the routes dict remains the same as before. This causes our RootController to dispatch it again to the same route as before which leads to a 404 error again. I provided a work-around in https://bitbucket.org/_amol_/kallithea-tg/commits/5ec7001cd47dece91580d8d533bacf3f0ab0d990 but probably the "correct" solution would be to remove RoutesMiddleware and perform the route resolution inside RootController so that the route is resolved every time we perform a dispatch and not only when receiving a request from the WSGI server.
_______________________________________________ kallithea-general mailing list [email protected] http://lists.sfconservancy.org/mailman/listinfo/kallithea-general
