diff options
author | danlark <danlark@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:10 +0300 |
commit | baa58daefa91fde4b4769facdbd2903763b9c6a8 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/cgiparam | |
parent | 3426a9bc7f169ae9da54cef557ad2a33f6e8eee0 (diff) | |
download | ydb-baa58daefa91fde4b4769facdbd2903763b9c6a8.tar.gz |
Restoring authorship annotation for <danlark@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/cgiparam')
-rw-r--r-- | library/cpp/cgiparam/cgiparam.cpp | 18 | ||||
-rw-r--r-- | library/cpp/cgiparam/cgiparam.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/cgiparam/cgiparam.cpp b/library/cpp/cgiparam/cgiparam.cpp index bd72f394bc..f3277b8e4b 100644 --- a/library/cpp/cgiparam/cgiparam.cpp +++ b/library/cpp/cgiparam/cgiparam.cpp @@ -70,7 +70,7 @@ void TCgiParameters::JoinUnescaped(const TStringBuf key, char sep, TStringBuf va for (++it; it != pair.second; erase(it++)) { dst += sep; - dst.AppendNoAlias(it->second.data(), it->second.size()); + dst.AppendNoAlias(it->second.data(), it->second.size()); } if (val.IsInited()) { @@ -83,8 +83,8 @@ void TCgiParameters::JoinUnescaped(const TStringBuf key, char sep, TStringBuf va static inline TString DoUnescape(const TStringBuf s) { TString res; - res.reserve(CgiUnescapeBufLen(s.size())); - res.ReserveAndResize(CgiUnescape(res.begin(), s).size()); + res.reserve(CgiUnescapeBufLen(s.size())); + res.ReserveAndResize(CgiUnescape(res.begin(), s).size()); return res; } @@ -144,7 +144,7 @@ TString TCgiParameters::Print() const { res.reserve(PrintSize()); const char* end = Print(res.begin()); - res.ReserveAndResize(end - res.data()); + res.ReserveAndResize(end - res.data()); return res; } @@ -173,7 +173,7 @@ size_t TCgiParameters::PrintSize() const noexcept { size_t res = size(); // for '&' for (const auto& i : *this) { - res += CgiEscapeBufLen(i.first.size() + i.second.size()); // extra zero will be used for '=' + res += CgiEscapeBufLen(i.first.size() + i.second.size()); // extra zero will be used for '=' } return res; @@ -200,7 +200,7 @@ TString TCgiParameters::QuotedPrint(const char* safe) const { *ptr++ = '&'; } - res.ReserveAndResize(ptr - res.data()); + res.ReserveAndResize(ptr - res.data()); return res; } @@ -229,14 +229,14 @@ bool TCgiParameters::Has(const TStringBuf name, const TStringBuf value) const no } TQuickCgiParam::TQuickCgiParam(const TStringBuf cgiParamStr) { - UnescapeBuf.reserve(CgiUnescapeBufLen(cgiParamStr.size())); + UnescapeBuf.reserve(CgiUnescapeBufLen(cgiParamStr.size())); char* buf = UnescapeBuf.begin(); auto f = [this, &buf](const TStringBuf key, const TStringBuf val) { TStringBuf name = CgiUnescapeBuf(buf, key); - buf += name.size() + 1; + buf += name.size() + 1; TStringBuf value = CgiUnescapeBuf(buf, val); - buf += value.size() + 1; + buf += value.size() + 1; Y_ASSERT(buf <= UnescapeBuf.begin() + UnescapeBuf.capacity() + 1 /*trailing zero*/); emplace(name, value); }; diff --git a/library/cpp/cgiparam/cgiparam.h b/library/cpp/cgiparam/cgiparam.h index 25fa670c97..87d1ab0ad4 100644 --- a/library/cpp/cgiparam/cgiparam.h +++ b/library/cpp/cgiparam/cgiparam.h @@ -129,7 +129,7 @@ public: return nullptr; } - return it->second.data(); + return it->second.data(); } }; |