summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorudovichenko-r <[email protected]>2023-08-16 11:57:30 +0300
committerudovichenko-r <[email protected]>2023-08-16 13:08:03 +0300
commit70bad0488066ff6cfd400a7e0f5ca9aaa24b2030 (patch)
treeeceb1f66e3007c75051de6d19b08318f0ffdcfe1
parent6091cce6bc0df840451743637fc1aac29f5311a4 (diff)
[ch-dq] Proper http/https priority in CH provider
YQL-16319
-rw-r--r--ydb/library/yql/providers/clickhouse/provider/yql_clickhouse_settings.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ydb/library/yql/providers/clickhouse/provider/yql_clickhouse_settings.h b/ydb/library/yql/providers/clickhouse/provider/yql_clickhouse_settings.h
index fc1acfff7f4..e305f69742c 100644
--- a/ydb/library/yql/providers/clickhouse/provider/yql_clickhouse_settings.h
+++ b/ydb/library/yql/providers/clickhouse/provider/yql_clickhouse_settings.h
@@ -69,15 +69,15 @@ struct TClickHouseConfiguration : public TClickHouseSettings, public NCommon::TS
host = cluster.GetCluster();
while (host.EndsWith("/"))
host = host.substr(0u, host.length() - 1u);
- if (host.StartsWith("http://")) {
- scheme = HS_HTTP;
- host = host.substr(7u);
- port = 80;
- } else {
+ if (host.StartsWith("https://")) {
scheme = HS_HTTPS;
+ host = host.substr(8u);
port = 443;
- if (host.StartsWith("https://")) {
- host = host.substr(8u);
+ } else {
+ scheme = HS_HTTP;
+ port = 80;
+ if (host.StartsWith("http://")) {
+ host = host.substr(7u);
}
}