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

Method createRequestHandler

src/Server/HTTPRequestHandlerFactoryMain.cpp:14–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14std::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}

Callers

nothing calls this directly

Calls 3

getURIMethod · 0.80
toStringForLoggingMethod · 0.45
getHintsMethod · 0.45

Tested by

no test coverage detected