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

Function handle

src/Server/WebUIRequestHandler.cpp:78–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76{
77
78static void handle(HTTPServerRequest & request, HTTPServerResponse & response, std::string_view html,
79 std::unordered_map<String, String> http_response_headers_override = {})
80{
81 applyHTTPResponseHeaders(response, http_response_headers_override);
82 if (response.getContentType().empty())
83 response.setContentType("text/html; charset=UTF-8");
84 if (request.getVersion() == HTTPServerRequest::HTTP_1_1)
85 response.setChunkedTransferEncoding(true);
86
87 setResponseDefaultHeaders(response);
88 response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_OK);
89 auto wb = WriteBufferFromHTTPServerResponse(response, request.getMethod() == HTTPRequest::HTTP_HEAD);
90 wb.write(html.data(), html.size());
91 wb.finalize();
92}
93
94void PlayWebUIRequestHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event &)
95{

Callers 15

executeMethod · 0.85
runMethod · 0.85
enqueueMethod · 0.85
runMethod · 0.85
dispatchMethod · 0.85
startMethod · 0.85
runMethod · 0.85
handleMethod · 0.85
parseImplMethod · 0.85
handleArrayMethod · 0.85
handleObjectMethod · 0.85
runMethod · 0.85

Calls 13

applyHTTPResponseHeadersFunction · 0.85
getContentTypeMethod · 0.80
setStatusAndReasonMethod · 0.80
emptyMethod · 0.45
setContentTypeMethod · 0.45
getVersionMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 2

dequeueMethod · 0.68
processMethod · 0.68