diff options
author | UbitUmarov | 2016-12-16 20:31:07 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-16 20:31:07 +0000 |
commit | 9b9f93c4b2f65e85129e50587a2ee63dd1d4f374 (patch) | |
tree | d045d669268d71bb80e8ef1827734c34026e64d6 /OpenSim/Framework/Util.cs | |
parent | remove a nonsense option (diff) | |
download | opensim-SC_OLD-9b9f93c4b2f65e85129e50587a2ee63dd1d4f374.zip opensim-SC_OLD-9b9f93c4b2f65e85129e50587a2ee63dd1d4f374.tar.gz opensim-SC_OLD-9b9f93c4b2f65e85129e50587a2ee63dd1d4f374.tar.bz2 opensim-SC_OLD-9b9f93c4b2f65e85129e50587a2ee63dd1d4f374.tar.xz |
and yes HG uri again
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 5d8a5e0..b622523 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -414,6 +414,26 @@ namespace OpenSim.Framework | |||
414 | return regionCoord << 8; | 414 | return regionCoord << 8; |
415 | } | 415 | } |
416 | 416 | ||
417 | public static bool checkServiceURI(string uristr, out string serviceURI) | ||
418 | { | ||
419 | serviceURI = string.Empty; | ||
420 | try | ||
421 | { | ||
422 | Uri uri = new Uri(uristr); | ||
423 | serviceURI = uri.AbsoluteUri; | ||
424 | if(uri.Port == 80) | ||
425 | serviceURI = serviceURI.Trim(new char[] { '/', ' ' }) +":80/"; | ||
426 | else if(uri.Port == 443) | ||
427 | serviceURI = serviceURI.Trim(new char[] { '/', ' ' }) +":443/"; | ||
428 | return true; | ||
429 | } | ||
430 | catch | ||
431 | { | ||
432 | serviceURI = string.Empty; | ||
433 | } | ||
434 | return false; | ||
435 | } | ||
436 | |||
417 | public static bool buildHGRegionURI(string inputName, out string serverURI, out string regionName) | 437 | public static bool buildHGRegionURI(string inputName, out string serverURI, out string regionName) |
418 | { | 438 | { |
419 | serverURI = string.Empty; | 439 | serverURI = string.Empty; |