Update HTTPHandler.cpp

This commit is contained in:
Alexey Milovidov 2023-02-14 11:11:24 +03:00 committed by GitHub
parent 307551f857
commit bd64098ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -558,10 +558,11 @@ void HTTPHandler::processQuery(
auto client_info = session->getClientInfo(); auto client_info = session->getClientInfo();
auto context = session->makeQueryContext(std::move(client_info)); auto context = session->makeQueryContext(std::move(client_info));
if (params.has("client_protocol_version")) { /// This parameter is used to tune the behavior of output formats (such as Native) for compatibility.
String version_param = params.get("client_protocol_version"); if (params.has("client_protocol_version"))
char * end; {
context->setClientProtocolVersion(strtol(&version_param.front(), &end, 10)); UInt64 version_param = parse<UInt64>(params.get("client_protocol_version"));
context->setClientProtocolVersion(version_param);
} }
/// The client can pass a HTTP header indicating supported compression method (gzip or deflate). /// The client can pass a HTTP header indicating supported compression method (gzip or deflate).