mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
32 lines
666 B
C++
32 lines
666 B
C++
|
#pragma once
|
||
|
|
||
|
#include <Poco/Logger.h>
|
||
|
#include <Poco/Net/HTTPRequestHandler.h>
|
||
|
|
||
|
#if USE_ODBC
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
class Context;
|
||
|
|
||
|
|
||
|
/// This handler establishes connection to database, and retrieve whether schema is allowed.
|
||
|
class SchemaAllowedHandler : public Poco::Net::HTTPRequestHandler
|
||
|
{
|
||
|
public:
|
||
|
SchemaAllowedHandler(size_t keep_alive_timeout_, Context &)
|
||
|
: log(&Poco::Logger::get("SchemaAllowedHandler")), keep_alive_timeout(keep_alive_timeout_)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
||
|
|
||
|
private:
|
||
|
Poco::Logger * log;
|
||
|
size_t keep_alive_timeout;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|