diff options
author | amatveyev <amatveyev@yandex-team.ru> | 2022-02-10 16:50:11 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:11 +0300 |
commit | 8bfc24a315c0a821841d2d5bb73e55268b7ecfb6 (patch) | |
tree | 11b6d7b43a1a1f99547031fd7c6218e292aee533 /library/cpp/uri | |
parent | 8d3a5b9c70bfb823a30242286328d6017b82b9ce (diff) | |
download | ydb-8bfc24a315c0a821841d2d5bb73e55268b7ecfb6.tar.gz |
Restoring authorship annotation for <amatveyev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/uri')
-rw-r--r-- | library/cpp/uri/assign.cpp | 2 | ||||
-rw-r--r-- | library/cpp/uri/uri-ru_ut.cpp | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/uri/assign.cpp b/library/cpp/uri/assign.cpp index ae9125c727..89c0d7cc12 100644 --- a/library/cpp/uri/assign.cpp +++ b/library/cpp/uri/assign.cpp @@ -320,7 +320,7 @@ namespace NUri { char* end = out.Buf(); const EField fld = convertIDN ? FieldHost : FieldHostAscii; FldSetNoDirty(fld, TStringBuf(beg, end)); - out << '\0'; + out << '\0'; } Buffer.Resize(out.Len()); diff --git a/library/cpp/uri/uri-ru_ut.cpp b/library/cpp/uri/uri-ru_ut.cpp index ec35a164d2..be7cfb5248 100644 --- a/library/cpp/uri/uri-ru_ut.cpp +++ b/library/cpp/uri/uri-ru_ut.cpp @@ -146,18 +146,18 @@ namespace NUri { #undef ENC } } - - // Regression test for SEARCH-11283 - Y_UNIT_TEST(RegressionTest11283) { - TStringBuf url = "http://xn--n1aaa.пидорасы.com/"; - - TUri uri; - TState::EParsed er = uri.Parse(url, NUri::TParseFlags(NUri::TFeature::FeaturesRobot | NUri::TFeature::FeatureNoRelPath)); - UNIT_ASSERT_VALUES_EQUAL(er, TState::ParsedOK); - TStringBuf host = uri.GetHost(); - // Should be properly null-terminated - UNIT_ASSERT_VALUES_EQUAL(host.size(), strlen(host.data())); - } + + // Regression test for SEARCH-11283 + Y_UNIT_TEST(RegressionTest11283) { + TStringBuf url = "http://xn--n1aaa.пидорасы.com/"; + + TUri uri; + TState::EParsed er = uri.Parse(url, NUri::TParseFlags(NUri::TFeature::FeaturesRobot | NUri::TFeature::FeatureNoRelPath)); + UNIT_ASSERT_VALUES_EQUAL(er, TState::ParsedOK); + TStringBuf host = uri.GetHost(); + // Should be properly null-terminated + UNIT_ASSERT_VALUES_EQUAL(host.size(), strlen(host.data())); + } } } |