aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/url/url.cpp
diff options
context:
space:
mode:
authordobrokot <dobrokot@yandex-team.ru>2022-02-10 16:49:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:07 +0300
commit25d83bf841d8b3ce3886525078f1964ac3c293c5 (patch)
treebd52fa16c8dd727890b2ef9d87d1a402bd0d3a9a /library/cpp/string_utils/url/url.cpp
parent1d2e8a8e9976488ea69a7e4763aa749244f82612 (diff)
downloadydb-25d83bf841d8b3ce3886525078f1964ac3c293c5.tar.gz
Restoring authorship annotation for <dobrokot@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url.cpp')
-rw-r--r--library/cpp/string_utils/url/url.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp
index 85f4ac5d69..82887bd3a0 100644
--- a/library/cpp/string_utils/url/url.cpp
+++ b/library/cpp/string_utils/url/url.cpp
@@ -241,11 +241,11 @@ TStringBuf GetOnlyHost(const TStringBuf url) noexcept {
TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment) noexcept {
const size_t off = url.find('/', GetHttpPrefixSize(url));
- TStringBuf hostUnused, path;
- if (!url.TrySplitAt(off, hostUnused, path))
+ TStringBuf hostUnused, path;
+ if (!url.TrySplitAt(off, hostUnused, path))
return "/";
-
- return trimFragment ? path.Before('#') : path;
+
+ return trimFragment ? path.Before('#') : path;
}
// this strange creature returns 2nd level domain, possibly with port
@@ -311,15 +311,15 @@ TStringBuf CutMPrefix(const TStringBuf url) noexcept {
}
static inline bool IsSchemeChar(char c) noexcept {
- return IsAsciiAlnum(c); //what about '+' ?..
+ return IsAsciiAlnum(c); //what about '+' ?..
}
static bool HasPrefix(const TStringBuf url) noexcept {
- TStringBuf scheme, unused;
+ TStringBuf scheme, unused;
if (!url.TrySplit(TStringBuf("://"), scheme, unused))
return false;
- return AllOf(scheme, IsSchemeChar);
+ return AllOf(scheme, IsSchemeChar);
}
TString AddSchemePrefix(const TString& url) {