drogon/lib
Nitromelon f4443dce44
Refine request routing process (#1871)
Code structure changes:
* Combine HttpSimpleControllersRouter, HttpControllersRouter and WebsocketControllersRouter, saving a lot of repetitive codes.
* Extract ControllerBinder classes from three Router classes.
* Extract aop advices and logics into AopAdvice class. Flatten the callback hells of AOPs. Prevent aop vectors from being passed into every router.
* Extract request handling process out of Router class. Let router class do its own work (routing only). Put them in HttpServer class. Now all http process logic stays in HttpServer class, no need to jump around to follow the code flow.
* Adjust doFilters() and doAdviceChain(), save a few lambda construction.
Fixed logic bugs (behavior changing):
* Fix inconsistent session handling (callCallback() vs. callback directly)
* Fix inconsistent aop path between SimpleController and HttpController
* Remove router if simple controller class not found.
2023-12-28 11:53:10 +08:00
..
inc/drogon Refine request routing process (#1871) 2023-12-28 11:53:10 +08:00
src Refine request routing process (#1871) 2023-12-28 11:53:10 +08:00
tests GitHub Action to find typos in the codebase using codespell (#1876) 2023-12-09 13:48:24 +08:00