MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / createRequestHandler

Method createRequestHandler

src/Server/KeeperHTTPHandlerFactory.cpp:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43std::unique_ptr<HTTPRequestHandler> KeeperHTTPRequestHandlerFactory::createRequestHandler(const HTTPServerRequest & request)
44{
45 LOG_TRACE(log, "HTTP Request for {}. {}", name, request.toStringForLogging());
46
47 for (auto & handler_factory : child_factories)
48 {
49 if (auto handler = handler_factory->createRequestHandler(request))
50 return handler;
51 }
52
53 if (request.getMethod() == Poco::Net::HTTPRequest::HTTP_GET || request.getMethod() == Poco::Net::HTTPRequest::HTTP_HEAD
54 || request.getMethod() == Poco::Net::HTTPRequest::HTTP_POST)
55 {
56 return std::make_unique<KeeperNotFoundHandler>(hints.getHints(request.getURI()));
57 }
58
59 return nullptr;
60}
61
62static void addDashboardHandlersToFactory(
63 KeeperHTTPRequestHandlerFactory & factory, std::shared_ptr<KeeperDispatcher> keeper_dispatcher)

Callers 2

runMethod · 0.45
runMethod · 0.45

Calls 3

getURIMethod · 0.80
toStringForLoggingMethod · 0.45
getHintsMethod · 0.45

Tested by

no test coverage detected