summaryrefslogtreecommitdiffstats
path: root/library/cpp/string_utils/url/url.h
diff options
context:
space:
mode:
authorSergey Polovko <[email protected]>2022-02-10 16:47:02 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:02 +0300
commit3e0b762a82514bac89c1dd6ea7211e381d8aa248 (patch)
treec2d1b379ecaf05ca8f11ed0b5da9d1a950e6e554 /library/cpp/string_utils/url/url.h
parentab3783171cc30e262243a0227c86118f7080c896 (diff)
Restoring authorship annotation for Sergey Polovko <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/string_utils/url/url.h')
-rw-r--r--library/cpp/string_utils/url/url.h60
1 files changed, 30 insertions, 30 deletions
diff --git a/library/cpp/string_utils/url/url.h b/library/cpp/string_utils/url/url.h
index 84137ccc57d..5e797e374aa 100644
--- a/library/cpp/string_utils/url/url.h
+++ b/library/cpp/string_utils/url/url.h
@@ -65,14 +65,14 @@ TString AddSchemePrefix(const TString& url);
Y_PURE_FUNCTION
TStringBuf GetHost(const TStringBuf url) noexcept;
-
+
Y_PURE_FUNCTION
TStringBuf GetHostAndPort(const TStringBuf url) noexcept;
Y_PURE_FUNCTION
TStringBuf GetSchemeHostAndPort(const TStringBuf url, bool trimHttp = true, bool trimDefaultPort = true) noexcept;
-/**
+/**
* Splits URL to host and path
*
* @param[in] url any URL
@@ -93,35 +93,35 @@ void SplitUrlToHostAndPath(const TStringBuf url, TString& host, TString& path);
void SeparateUrlFromQueryAndFragment(const TStringBuf url, TStringBuf& sanitizedUrl, TStringBuf& query, TStringBuf& fragment);
/**
- * Extracts scheme, host and port from URL.
- *
- * Port will be parsed from URL with checks against ui16 overflow. If URL doesn't
- * contain port it will be determined by one of the known schemes (currently
- * https:// and http:// only).
- * Given parameters will not be modified if URL has no appropriate components.
- *
- * @param[in] url any URL
- * @param[out] scheme URL scheme
- * @param[out] host host name
- * @param[out] port parsed port number
- * @return false if present port number cannot be parsed into ui16
- * true otherwise.
- */
-bool TryGetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port);
-
-/**
- * Extracts scheme, host and port from URL.
- *
+ * Extracts scheme, host and port from URL.
+ *
+ * Port will be parsed from URL with checks against ui16 overflow. If URL doesn't
+ * contain port it will be determined by one of the known schemes (currently
+ * https:// and http:// only).
+ * Given parameters will not be modified if URL has no appropriate components.
+ *
+ * @param[in] url any URL
+ * @param[out] scheme URL scheme
+ * @param[out] host host name
+ * @param[out] port parsed port number
+ * @return false if present port number cannot be parsed into ui16
+ * true otherwise.
+ */
+bool TryGetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port);
+
+/**
+ * Extracts scheme, host and port from URL.
+ *
* This function perform the same actions as TryGetSchemeHostAndPort(), but in
- * case of impossibility to parse port number throws yexception.
- *
- * @param[in] url any URL
- * @param[out] scheme URL scheme
- * @param[out] host host name
- * @param[out] port parsed port number
- * @throws yexception if present port number cannot be parsed into ui16.
- */
-void GetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port);
+ * case of impossibility to parse port number throws yexception.
+ *
+ * @param[in] url any URL
+ * @param[out] scheme URL scheme
+ * @param[out] host host name
+ * @param[out] port parsed port number
+ * @throws yexception if present port number cannot be parsed into ui16.
+ */
+void GetSchemeHostAndPort(const TStringBuf url, TStringBuf& scheme, TStringBuf& host, ui16& port);
Y_PURE_FUNCTION
TStringBuf GetPathAndQuery(const TStringBuf url, bool trimFragment = true) noexcept;