1 | #include "PingHandler.h" |
---|---|
2 | #include <Poco/Net/HTTPServerRequest.h> |
3 | #include <Poco/Net/HTTPServerResponse.h> |
4 | #include <Common/Exception.h> |
5 | #include <IO/HTTPCommon.h> |
6 | |
7 | namespace DB |
8 | { |
9 | void PingHandler::handleRequest(Poco::Net::HTTPServerRequest & /*request*/, Poco::Net::HTTPServerResponse & response) |
10 | { |
11 | try |
12 | { |
13 | setResponseDefaultHeaders(response, keep_alive_timeout); |
14 | const char * data = "Ok.\n"; |
15 | response.sendBuffer(data, strlen(data)); |
16 | } |
17 | catch (...) |
18 | { |
19 | tryLogCurrentException("PingHandler"); |
20 | } |
21 | } |
22 | } |
23 |