Style fixes in HTTPHandlerFactory

This commit is contained in:
VDimir 2019-11-26 19:34:37 +03:00
parent 2ddb801d0b
commit eadc58bbd6
2 changed files with 9 additions and 5 deletions

View File

@ -23,7 +23,8 @@ Poco::Net::HTTPRequestHandler * HTTPRequestHandlerFactoryMain::createRequestHand
<< ", Content Type: " << request.getContentType()
<< ", Transfer Encoding: " << request.getTransferEncoding());
for (auto & handlerFactory: child_handler_factories) {
for (auto & handlerFactory: child_handler_factories)
{
auto handler = handlerFactory->createRequestHandler(request);
if (handler != nullptr)
return handler;
@ -39,4 +40,4 @@ Poco::Net::HTTPRequestHandler * HTTPRequestHandlerFactoryMain::createRequestHand
return nullptr;
}
}
}

View File

@ -87,19 +87,22 @@ public:
};
struct RootEndpoint {
struct RootEndpoint
{
static constexpr auto path = "/";
static constexpr auto strict_path = true;
using HandleType = RootRequestHandler;
};
struct PingEndpoint {
struct PingEndpoint
{
static constexpr auto path = "/ping";
static constexpr auto strict_path = true;
using HandleType = PingRequestHandler;
};
struct ReplicasStatusEndpoint {
struct ReplicasStatusEndpoint
{
static constexpr auto path = "/replicas_status";
static constexpr auto strict_path = false;
using HandleType = ReplicasStatusHandler;