mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
Fix support content_type for dynamic_query_handler
This commit is contained in:
parent
eded0d7f82
commit
83787b9651
@ -1125,7 +1125,13 @@ std::string PredefinedQueryHandler::getQuery(HTTPServerRequest & request, HTMLFo
|
||||
HTTPRequestHandlerFactoryPtr createDynamicHandlerFactory(IServer & server, const std::string & config_prefix)
|
||||
{
|
||||
const auto & query_param_name = server.config().getString(config_prefix + ".handler.query_param_name", "query");
|
||||
auto factory = std::make_shared<HandlingRuleHTTPHandlerFactory<DynamicQueryHandler>>(server, std::move(query_param_name));
|
||||
|
||||
std::optional<String> content_type_override;
|
||||
if (server.config().has(config_prefix + ".handler.content_type"))
|
||||
content_type_override = server.config().getString(config_prefix + ".handler.content_type");
|
||||
|
||||
auto factory = std::make_shared<HandlingRuleHTTPHandlerFactory<DynamicQueryHandler>>(
|
||||
server, std::move(query_param_name), std::move(content_type_override));
|
||||
|
||||
factory->addFiltersFromConfig(server.config(), config_prefix);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user