Releases: kamchatka-volcano/asyncgi
Releases · kamchatka-volcano/asyncgi
Release list
v0.6.0
v0.5.0
- Added
asyncgi_fwd.hheader with forward declarations - Made
asyncgi::Errora class instead of a struct - BREAKING Placed the
fastcginamespace inside theasyncginamespace
v0.4.0
- BREAKING Renamed
asyncgi::Responsetoasyncgi::Responder - BREAKING Removed
asyncgi::Response::redirect()method.
Now it's possible to create redirection responses ergonomically by usinghttp::Redirectstructure that can be passed to thehttp::Responseconstructor. - Request processors now support the
http::Response(const asyncgi::Request&)signature, which is now the default and recommended way of using them. Examples and documentation have been updated accordingly.
v0.3.2
- Removed an HTTP status header; now
asyncgican be used with webservers that consider FastCGI responses with this header malformed.
v0.3.1
- Fixed the standalone installation of
asyncgiby bundlingfcgi_responderas an object library;
v0.3.0
- BREAKING
asyncgi::Routernow depends onasyncgi::IO:
auto io = asyncgi::IO{};
auto router = asyncgi::Router{io};
- BREAKING
ErrorHandlerwas replaced withEventHandlerProxy- a flexible callback system allowing backwards-compatible extension.
Currently only error event handlers are supported with the signaturevoid(asyncgi::ErrorEvent, std::string_view);
Event handler is passed as the last parameter to theasyncgi::IOobject's constructor:
auto io = asyncgi::IO{[](asyncgi::ErrorEvent, std::string_view errorMsg){ std::cerr << errorMsg << "\n";}};
It's planned to add an optional logger based on this system in the future releases. The event handling will be documented then.
v0.2.0
This release is not backwards compatible with v0.1.0. Please refer to the README for detailed information about the new interface.
- The
asyncgi::Apphas been replaced with theasyncgi::IOservice. The factory functionsmakeApp,makeServer,makeClient,makeTimer, andmakeAsioDispatcherhave been removed. Now, all entities are created on the stack and take a reference to anasyncgi::IOobject in their constructors.
Before:
auto app = asyncgi::makeApp();
auto serverPtr = app->makeServer();
After:
auto io = asyncgi::IO{};
auto server = asyncgi::Server{io};
-
The
asyncgi::RequestProcessorbase class has been removed. Now, any callable with a compatible signature ofvoid(const asyncgi::Request&, asyncgi::Response&)can be used for request processing. -
The
asyncgi::Routernow allows passing regular expression capturing group values to the arguments of registered request processors.
router.route(asyncgi::rx{"/page/(\\d)")`).process([](int pageNumber, const asyncgi::Request&, asyncgi::Response&){ ... });
- The route context is no longer embedded in the
asyncgi::Responseobject. Instead, it is passed as the last argument to the request processor.
auto router = asyncgi::Router<Context>{};
router.route().process([](const asyncgi::Request&, asyncgi::Response&, Context& context){ ... });
- The
asyncgi::RouteSpecificationhas been renamed toasyncgi::RouteMatcher. - The
TimerModeenum has been replaced with thestartPeriodic()timer method. - Windows support has been added, along with functional tests and CI configuration.
- Compatibility with Boost.Asio has been added.