aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/url/url.cpp
diff options
context:
space:
mode:
authorvbezhentsev <vbezhentsev@yandex-team.ru>2022-02-10 16:49:55 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:55 +0300
commita26ab7ed1c37272cdb769a5c3192a69c58c3adf9 (patch)
treebd402f4105abc85af0c3ae22a16aa896be186e4a /library/cpp/string_utils/url/url.cpp
parent553b4d1ea5e01ab98a8cfa8e3cfed79a0a93972d (diff)
downloadydb-a26ab7ed1c37272cdb769a5c3192a69c58c3adf9.tar.gz
Restoring authorship annotation for <vbezhentsev@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.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/string_utils/url/url.cpp b/library/cpp/string_utils/url/url.cpp
index 85f4ac5d69..d2926b76b8 100644
--- a/library/cpp/string_utils/url/url.cpp
+++ b/library/cpp/string_utils/url/url.cpp
@@ -194,18 +194,18 @@ void SplitUrlToHostAndPath(const TStringBuf url, TString& host, TString& path) {
path = pathBuf;
}
-void SeparateUrlFromQueryAndFragment(const TStringBuf url, TStringBuf& sanitizedUrl, TStringBuf& query, TStringBuf& fragment) {
- TStringBuf urlWithoutFragment;
- if (!url.TrySplit('#', urlWithoutFragment, fragment)) {
- fragment = "";
- urlWithoutFragment = url;
- }
- if (!urlWithoutFragment.TrySplit('?', sanitizedUrl, query)) {
- query = "";
- sanitizedUrl = urlWithoutFragment;
- }
-}
-
+void SeparateUrlFromQueryAndFragment(const TStringBuf url, TStringBuf& sanitizedUrl, TStringBuf& query, TStringBuf& fragment) {
+ TStringBuf urlWithoutFragment;
+ if (!url.TrySplit('#', urlWithoutFragment, fragment)) {
+ fragment = "";
+ urlWithoutFragment = url;
+ }
+ if (!urlWithoutFragment.TrySplit('?', sanitizedUrl, query)) {
+ query = "";
+ sanitizedUrl = urlWithoutFragment;
+ }
+}
+
bool TryGetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port) {
const size_t schemeSize = GetSchemePrefixSize(url);
if (schemeSize != 0) {