mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-16 12:44:42 +00:00
414f470c79
* Refactoring: part 1 * Refactoring: part 2 * Handle request using ReadBuffer interface * Struggles with ReadBuffer's * Fix URI parsing * Implement parsing of multipart/form-data * Check HTTP_LENGTH_REQUIRED before eof() or will hang * Fix HTTPChunkedReadBuffer * Fix build and style * Fix test * Resist double-eof * Fix arcadian build
23 lines
529 B
C++
23 lines
529 B
C++
#include "PingHandler.h"
|
|
#include <Poco/Net/HTTPServerRequest.h>
|
|
#include <Poco/Net/HTTPServerResponse.h>
|
|
#include <Common/Exception.h>
|
|
#include <IO/HTTPCommon.h>
|
|
|
|
namespace DB
|
|
{
|
|
void PingHandler::handleRequest(HTTPServerRequest & /* request */, HTTPServerResponse & response)
|
|
{
|
|
try
|
|
{
|
|
setResponseDefaultHeaders(response, keep_alive_timeout);
|
|
const char * data = "Ok.\n";
|
|
response.sendBuffer(data, strlen(data));
|
|
}
|
|
catch (...)
|
|
{
|
|
tryLogCurrentException("PingHandler");
|
|
}
|
|
}
|
|
}
|