From b10940e8e38db7c7fc4adbd73ad8a56dec2b58f3 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Fri, 27 Mar 2015 11:23:58 +0200
Subject: [PATCH] MAINT-5019 FIXED Undesired http:// added to domains sent in
 chat

---
 indra/llcommon/lluriparser.cpp | 5 +++--
 indra/llcommon/lluriparser.h   | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/indra/llcommon/lluriparser.cpp b/indra/llcommon/lluriparser.cpp
index 08b19c56e0f..e24e53426ed 100644
--- a/indra/llcommon/lluriparser.cpp
+++ b/indra/llcommon/lluriparser.cpp
@@ -29,7 +29,7 @@
 #include "linden_common.h"
 #include "lluriparser.h"
 
-LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mRes(0)
+LLUriParser::LLUriParser(const std::string& u) : mTmpScheme(false), mNormalizedTmp(false), mRes(0)
 {
 	mState.uri = &mUri;
 
@@ -140,7 +140,7 @@ void LLUriParser::extractParts()
 		return;
 	}
 
-	if (mTmpScheme)
+	if (mTmpScheme || mNormalizedTmp)
 	{
 		mScheme.clear();
 	}
@@ -169,6 +169,7 @@ void LLUriParser::extractParts()
 
 S32 LLUriParser::normalize()
 {
+	mNormalizedTmp = mTmpScheme;
 	if (!mRes)
 	{
 		mRes = uriNormalizeSyntaxExA(&mUri, URI_NORMALIZE_SCHEME | URI_NORMALIZE_HOST);
diff --git a/indra/llcommon/lluriparser.h b/indra/llcommon/lluriparser.h
index e987bae9249..561431e8f90 100644
--- a/indra/llcommon/lluriparser.h
+++ b/indra/llcommon/lluriparser.h
@@ -81,6 +81,7 @@ class LL_COMMON_API LLUriParser
 
 	S32 mRes;
 	bool mTmpScheme;
+	bool mNormalizedTmp;
 };
 
 #endif // LL_LLURIPARSER_H
-- 
GitLab