aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
index d04cc22..c0041e6 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs
@@ -47,16 +47,22 @@ namespace OpenSim.Services.Connectors
47 47
48 public HeloServicesConnector(string serverURI) 48 public HeloServicesConnector(string serverURI)
49 { 49 {
50 if (!serverURI.EndsWith("=")) 50 try
51 m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
52 else
53 { 51 {
54 // Simian sends malformed urls like this: 52 Uri uri;
55 // http://valley.virtualportland.org/simtest/Grid/?id= 53
56 // 54 if (!serverURI.EndsWith("="))
57 try
58 { 55 {
59 Uri uri = new Uri(serverURI + "xxx"); 56 // Let's check if this is a valid URI, because it may not be
57 uri = new Uri(serverURI);
58 m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
59 }
60 else
61 {
62 // Simian sends malformed urls like this:
63 // http://valley.virtualportland.org/simtest/Grid/?id=
64 //
65 uri = new Uri(serverURI + "xxx");
60 if (uri.Query == string.Empty) 66 if (uri.Query == string.Empty)
61 m_ServerURI = serverURI.TrimEnd('/') + "/helo/"; 67 m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
62 else 68 else
@@ -66,10 +72,11 @@ namespace OpenSim.Services.Connectors
66 m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/"; 72 m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/";
67 } 73 }
68 } 74 }
69 catch (UriFormatException) 75
70 { 76 }
71 m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI); 77 catch (UriFormatException)
72 } 78 {
79 m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI);
73 } 80 }
74 } 81 }
75 82