MCPcopy Create free account
hub / github.com/ByConity/ByConity / handleRequest

Method handleRequest

src/Server/WebUIRequestHandler.cpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21void WebUIRequestHandler::handleRequest(HTTPServerRequest & request, HTTPServerResponse & response)
22{
23 auto keep_alive_timeout = server.config().getUInt("keep_alive_timeout", 10);
24
25 response.setContentType("text/html; charset=UTF-8");
26
27 if (request.getVersion() == HTTPServerRequest::HTTP_1_1)
28 response.setChunkedTransferEncoding(true);
29
30 setResponseDefaultHeaders(response, keep_alive_timeout);
31 response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_OK);
32 *response.send() << getResource(resource_name);
33}
34
35}

Callers

nothing calls this directly

Calls 6

getResourceFunction · 0.85
getUIntMethod · 0.45
configMethod · 0.45
getVersionMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected