From db94395c629efff09d49a8ab8adff45a613190ac Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 21 Nov 2020 23:06:58 +0000 Subject: [PATCH] mantis 8816: change handling of uri end slash --- OpenSim/Framework/GridInfo.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenSim/Framework/GridInfo.cs b/OpenSim/Framework/GridInfo.cs index ed2510121e..76b090eab4 100644 --- a/OpenSim/Framework/GridInfo.cs +++ b/OpenSim/Framework/GridInfo.cs @@ -79,11 +79,11 @@ namespace OpenSim.Framework Port = m_checkuri.Port; Path = m_checkuri.AbsolutePath; - if (Path[Path.Length - 1] == '/') - Path = Path.Substring(0, Path.Length - 1); - URL = m_checkuri.Scheme + "://" + Host + ":" + Port; - URI = URL + Path; + if (Path == "/") + URI = URL; + else + URI = URL + Path; if (withDNSResolve) { @@ -721,7 +721,7 @@ namespace OpenSim.Framework { OSHTTPURI tmp = new OSHTTPURI(value, true); if (tmp.IsResolvedHost) - m_SearchURL = tmp.URIwEndSlash; + m_SearchURL = tmp.URI; else m_log.Error((tmp.IsValidHost ? "Could not resolve SearchURL" : "SearchURL is a invalid host ") + value??""); } @@ -734,7 +734,7 @@ namespace OpenSim.Framework { OSHTTPURI tmp = new OSHTTPURI(value, true); if (tmp.IsResolvedHost) - m_DestinationGuideURL = tmp.URIwEndSlash; + m_DestinationGuideURL = tmp.URI; else m_log.Error((tmp.IsValidHost ? "Could not resolve DestinationGuideURL" : "DestinationGuideURL is a invalid host ") + value ?? ""); } @@ -747,7 +747,7 @@ namespace OpenSim.Framework { OSHTTPURI tmp = new OSHTTPURI(value, true); if (tmp.IsResolvedHost) - m_economyURL = tmp.URIwEndSlash; + m_economyURL = tmp.URI; else m_log.Error((tmp.IsValidHost ? "Could not resolve EconomyURL" : "EconomyURL is a invalid host ") + value ?? ""); }