aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorglebx777 <glebx777@yandex-team.ru>2022-02-10 16:49:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:44 +0300
commitab9150ae9d81b97b19a2a6a8b903f9a40791c8b4 (patch)
treeff7ea20bcb3779c1ae74319692b5b48686d480cc /library
parent5a8cb97e0064c6b1afe060dc7a4a7c9c0eb879be (diff)
downloadydb-ab9150ae9d81b97b19a2a6a8b903f9a40791c8b4.tar.gz
Restoring authorship annotation for <glebx777@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/cgiparam/cgiparam.cpp16
-rw-r--r--library/cpp/cgiparam/cgiparam.h2
-rw-r--r--library/cpp/cgiparam/cgiparam_ut.cpp46
-rw-r--r--library/cpp/http/io/headers.cpp8
-rw-r--r--library/cpp/http/io/headers.h4
-rw-r--r--library/cpp/logger/element.h2
-rw-r--r--library/cpp/uri/uri.cpp2
7 files changed, 40 insertions, 40 deletions
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp
index f3277b8e4b..bb63abd7be 100644
--- a/library/cpp/cgiparam/cgiparam.cpp
+++ b/library/cpp/cgiparam/cgiparam.cpp
@@ -125,14 +125,14 @@ void TCgiParameters::ScanAddUnescaped(const TStringBuf query) {
DoScan<false>(query, f);
}
-void TCgiParameters::ScanAddAllUnescaped(const TStringBuf query) {
- auto f = [this](const TStringBuf key, const TStringBuf val) {
- this->InsertUnescaped(key, val);
- };
-
- DoScan<true>(query, f);
-}
-
+void TCgiParameters::ScanAddAllUnescaped(const TStringBuf query) {
+ auto f = [this](const TStringBuf key, const TStringBuf val) {
+ this->InsertUnescaped(key, val);
+ };
+
+ DoScan<true>(query, f);
+}
+
void TCgiParameters::ScanAddAll(const TStringBuf query) {
TAddEscaped f = {this};
diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h
index 87d1ab0ad4..7d29150877 100644
--- a/library/cpp/cgiparam/cgiparam.h
+++ b/library/cpp/cgiparam/cgiparam.h
@@ -43,7 +43,7 @@ public:
void Scan(const TStringBuf cgiParStr, bool form = true);
void ScanAdd(const TStringBuf cgiParStr);
void ScanAddUnescaped(const TStringBuf cgiParStr);
- void ScanAddAllUnescaped(const TStringBuf cgiParStr);
+ void ScanAddAllUnescaped(const TStringBuf cgiParStr);
void ScanAddAll(const TStringBuf cgiParStr);
/// Returns the string representation of all the stored parameters
diff --git a/library/cpp/cgiparam/cgiparam_ut.cpp b/library/cpp/cgiparam/cgiparam_ut.cpp
index a562342084..140da4ee5c 100644
--- a/library/cpp/cgiparam/cgiparam_ut.cpp
+++ b/library/cpp/cgiparam/cgiparam_ut.cpp
@@ -88,29 +88,29 @@ Y_UNIT_TEST_SUITE(TCgiParametersTest) {
UNIT_ASSERT_VALUES_EQUAL(c.Print(), "aaa=1&bbb=&ccc=1&ccc=3&ccc=2");
}
- Y_UNIT_TEST(TestScanAddAllUnescaped1) {
- TCgiParameters c;
- c.ScanAddAllUnescaped("ccc=1&aaa=1&ccc=3&bbb&ccc=2");
-
- UNIT_ASSERT_VALUES_EQUAL(c.Print(), "aaa=1&bbb=&ccc=1&ccc=3&ccc=2");
- }
-
- Y_UNIT_TEST(TestScanAddAllUnescaped2) {
- TCgiParameters c;
- c.ScanAddAllUnescaped("text=something&null");
-
- UNIT_ASSERT_VALUES_EQUAL(c.size(), 2u);
- UNIT_ASSERT_VALUES_EQUAL(c.Get("text"), "something");
- UNIT_ASSERT(c.Get("null").empty());
- }
-
- Y_UNIT_TEST(TestScanAddAllUnescaped3) {
- TCgiParameters c;
- c.ScanAddAllUnescaped("text=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%2C");
-
- UNIT_ASSERT_VALUES_EQUAL(c.Get("text"), "%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%2C");
- }
-
+ Y_UNIT_TEST(TestScanAddAllUnescaped1) {
+ TCgiParameters c;
+ c.ScanAddAllUnescaped("ccc=1&aaa=1&ccc=3&bbb&ccc=2");
+
+ UNIT_ASSERT_VALUES_EQUAL(c.Print(), "aaa=1&bbb=&ccc=1&ccc=3&ccc=2");
+ }
+
+ Y_UNIT_TEST(TestScanAddAllUnescaped2) {
+ TCgiParameters c;
+ c.ScanAddAllUnescaped("text=something&null");
+
+ UNIT_ASSERT_VALUES_EQUAL(c.size(), 2u);
+ UNIT_ASSERT_VALUES_EQUAL(c.Get("text"), "something");
+ UNIT_ASSERT(c.Get("null").empty());
+ }
+
+ Y_UNIT_TEST(TestScanAddAllUnescaped3) {
+ TCgiParameters c;
+ c.ScanAddAllUnescaped("text=%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%2C");
+
+ UNIT_ASSERT_VALUES_EQUAL(c.Get("text"), "%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%2C");
+ }
+
Y_UNIT_TEST(TestEraseAll) {
TCgiParameters c;
c.ScanAddAll("par=1&aaa=1&par=2&bbb&par=3");
diff --git a/library/cpp/http/io/headers.cpp b/library/cpp/http/io/headers.cpp
index 4ec27a29e8..180b939de4 100644
--- a/library/cpp/http/io/headers.cpp
+++ b/library/cpp/http/io/headers.cpp
@@ -67,11 +67,11 @@ const THttpInputHeader* THttpHeaders::FindHeader(const TStringBuf header) const
for (const auto& hdr : Headers_) {
if (AsciiCompareIgnoreCase(hdr.Name(), header) == 0) {
return &hdr;
- }
- }
+ }
+ }
return nullptr;
-}
-
+}
+
void THttpHeaders::RemoveHeader(const TStringBuf header) {
for (auto h = Headers_.begin(); h != Headers_.end(); ++h) {
if (AsciiCompareIgnoreCase(h->Name(), header) == 0) {
diff --git a/library/cpp/http/io/headers.h b/library/cpp/http/io/headers.h
index a71793d1c6..e480b7ecb1 100644
--- a/library/cpp/http/io/headers.h
+++ b/library/cpp/http/io/headers.h
@@ -99,9 +99,9 @@ public:
AddOrReplaceHeader(THttpInputHeader(std::move(name), ToString(value)));
}
- // Проверяет, есть ли такой заголовок
+ // Проверяет, есть ли такой заголовок
bool HasHeader(TStringBuf header) const;
-
+
/// Удаляет заголовок, если он есть.
void RemoveHeader(TStringBuf header);
diff --git a/library/cpp/logger/element.h b/library/cpp/logger/element.h
index fc9bff851f..5dad1d8e84 100644
--- a/library/cpp/logger/element.h
+++ b/library/cpp/logger/element.h
@@ -9,7 +9,7 @@ class TLog;
/*
* better do not use directly
*/
-class TLogElement: public TTempBufOutput {
+class TLogElement: public TTempBufOutput {
public:
TLogElement(const TLog* parent);
TLogElement(const TLog* parent, ELogPriority priority);
diff --git a/library/cpp/uri/uri.cpp b/library/cpp/uri/uri.cpp
index 56a9a4e5ef..cdf48e5323 100644
--- a/library/cpp/uri/uri.cpp
+++ b/library/cpp/uri/uri.cpp
@@ -258,7 +258,7 @@ namespace NUri {
bool pathop = true;
- TTempBufOutput out(p0.length() + p1.length() + 4);
+ TTempBufOutput out(p0.length() + p1.length() + 4);
out << p0;
if ('/' != p0.back())
out << "/../";