| 12 | } |
| 13 | |
| 14 | std::unique_ptr<HTTPRequestHandler> HTTPRequestHandlerFactoryMain::createRequestHandler(const HTTPServerRequest & request) |
| 15 | { |
| 16 | LOG_TRACE(log, "HTTP Request for {}. {}", name, request.toStringForLogging()); |
| 17 | |
| 18 | for (auto & handler_factory : child_factories) |
| 19 | { |
| 20 | auto handler = handler_factory->createRequestHandler(request); |
| 21 | if (handler) |
| 22 | return handler; |
| 23 | } |
| 24 | |
| 25 | if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_GET |
| 26 | || request.getMethod() == Poco::Net::HTTPRequest::HTTP_HEAD |
| 27 | || request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST) |
| 28 | { |
| 29 | return std::unique_ptr<HTTPRequestHandler>(new NotFoundHandler(hints.getHints(request.getURI()))); |
| 30 | } |
| 31 | |
| 32 | return nullptr; |
| 33 | } |
| 34 | |
| 35 | } |
nothing calls this directly
no test coverage detected