and yes HG uri again

This commit is contained in:
UbitUmarov
2016-12-16 20:31:07 +00:00
parent be490a8312
commit 9b9f93c4b2
2 changed files with 46 additions and 6 deletions

View File

@@ -414,6 +414,26 @@ namespace OpenSim.Framework
return regionCoord << 8;
}
public static bool checkServiceURI(string uristr, out string serviceURI)
{
serviceURI = string.Empty;
try
{
Uri uri = new Uri(uristr);
serviceURI = uri.AbsoluteUri;
if(uri.Port == 80)
serviceURI = serviceURI.Trim(new char[] { '/', ' ' }) +":80/";
else if(uri.Port == 443)
serviceURI = serviceURI.Trim(new char[] { '/', ' ' }) +":443/";
return true;
}
catch
{
serviceURI = string.Empty;
}
return false;
}
public static bool buildHGRegionURI(string inputName, out string serverURI, out string regionName)
{
serverURI = string.Empty;