diff options
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; |