diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-08-08 09:17:54 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-08-08 09:42:27 +0300 |
commit | b57b741fb9567d19b41bd8563cddd187f43ea9fe (patch) | |
tree | ef42062aba63ce707bc3a47c3203091ff49b2fbe /yt | |
parent | 96ca47afe1c5916b083e9ba5ea29224363b929a5 (diff) | |
download | ydb-b57b741fb9567d19b41bd8563cddd187f43ea9fe.tar.gz |
Intermediate changes
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/core/http/client.cpp | 2 | ||||
-rw-r--r-- | yt/yt/core/http/config.cpp | 2 | ||||
-rw-r--r-- | yt/yt/core/http/config.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/yt/yt/core/http/client.cpp b/yt/yt/core/http/client.cpp index 67091afd79..49ab4286f7 100644 --- a/yt/yt/core/http/client.cpp +++ b/yt/yt/core/http/client.cpp @@ -247,7 +247,7 @@ private: request->SetHeaders(headers); } - auto requestPath = urlRef.RawQuery.empty() + auto requestPath = (urlRef.RawQuery.empty() && Config_->OmitQuestionMarkForEmptyQuery) ? TString(urlRef.Path) : Format("%v?%v", urlRef.Path, urlRef.RawQuery); request->WriteRequest(method, requestPath); diff --git a/yt/yt/core/http/config.cpp b/yt/yt/core/http/config.cpp index 92584561c8..0497c15327 100644 --- a/yt/yt/core/http/config.cpp +++ b/yt/yt/core/http/config.cpp @@ -62,6 +62,8 @@ void TClientConfig::Register(TRegistrar registrar) .GreaterThanOrEqual(0); registrar.Parameter("dialer", &TThis::Dialer) .DefaultNew(); + registrar.Parameter("omit_question_mark_for_empty_query", &TThis::OmitQuestionMarkForEmptyQuery) + .Default(false); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/http/config.h b/yt/yt/core/http/config.h index ee6e5511e9..937f99a29a 100644 --- a/yt/yt/core/http/config.h +++ b/yt/yt/core/http/config.h @@ -76,6 +76,7 @@ class TClientConfig public: int MaxIdleConnections; NNet::TDialerConfigPtr Dialer; + bool OmitQuestionMarkForEmptyQuery; REGISTER_YSON_STRUCT(TClientConfig); |