diff options
author | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-10-13 19:14:42 +0300 |
---|---|---|
committer | maksymsproductengine <maksymsproductengine@lindenlab.com> | 2014-10-13 19:14:42 +0300 |
commit | 2b8827a55f6a935bac8abb7513be1c00659f6ab1 (patch) | |
tree | dc793cf932fd2220c6911519ebe836f3258e66bd /indra/llcommon | |
parent | 94ac0064354594de8adbb99084029c8b4027b2f6 (diff) |
MAINT-4169 FIXED Suppress initial display of the path portion of URLs from other users and scripts
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/lluriparser.cpp | 24 | ||||
-rw-r--r-- | indra/llcommon/lluriparser.h | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp index 0fb004ef7e..d07288f123 100644 --- a/indra/llcommon/lluriparser.cpp +++ b/indra/llcommon/lluriparser.cpp @@ -192,19 +192,41 @@ S32 LLUriParser::normalize() void LLUriParser::glue(std::string& uri) const { + std::string first_part; + glueFirst(first_part); + + std::string second_part; + glueSecond(second_part); + + uri = first_part + second_part; +} + +void LLUriParser::glueFirst(std::string& uri) const +{ if (mScheme.size()) { uri = mScheme; uri += "://"; } + else + { + uri.clear(); + } uri += mHost; +} +void LLUriParser::glueSecond(std::string& uri) const +{ if (mPort.size()) { - uri += ':'; + uri = ':'; uri += mPort; } + else + { + uri.clear(); + } uri += mPath; diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h index 719f916837..e987bae924 100644 --- a/indra/llcommon/lluriparser.h +++ b/indra/llcommon/lluriparser.h @@ -60,6 +60,8 @@ public: void extractParts(); void glue(std::string& uri) const; + void glueFirst(std::string& uri) const; + void glueSecond(std::string& uri) const; bool test() const; S32 normalize(); |