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.
Note: after this submission, users who use the SecureSSLRedirector plugin and the SlashRemover plugin should add the following line to the configuration file:
{
"name": "drogon::plugin::Redirector",
"dependencies": [],
"config": {
}
}
and add the plugin name "drogon::plugin::Redirector" to the dependencies list of the SecureSSLRedirector plugin and the SlashRemover plugin.
* Drop C++14 Support
* Update README.md
* Remove drogon::optional in favor of std::optional
* Remove drogon::filesystem in favor of std::filesystem
* Remove boost::string_view and pre-c++17 hacks
* Remove boost::any
* Remove the string_view.h and the any.h
* Remove boost lib
* Update .clang-format and ci
Co-authored-by: Omar Mohamed <omar@omar-laptop.lan>
Co-authored-by: Ken Matsui <26405363+ken-matsui@users.noreply.github.com>
Co-authored-by: An Tao <antao2002@gmail.com>
Co-authored-by: albaropereyra22 <141711575+albaropereyra22@users.noreply.github.com>
Co-authored-by: Yoshihiro Hokazono <47231909+hokacci@users.noreply.github.com>
Co-authored-by: Omar Mohamed Khallaf <51155980+omarmohamedkh@users.noreply.github.com>
* Maintain compatibility with cmake generated from older drogon_ctl
* Use user-defined C++ version when possible
* C++ version detection no-longer depends on std::filesystem availability
* Link against c++fs in DrogonConfig.cmake if on those versions of GCC
* Allow DrogonConfig to use user-defined C++ version