Better (amend to previous commit)
parent
c0fd09b445
commit
86105a1533
|
@ -47,16 +47,22 @@ namespace OpenSim.Services.Connectors
|
|||
|
||||
public HeloServicesConnector(string serverURI)
|
||||
{
|
||||
if (!serverURI.EndsWith("="))
|
||||
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
||||
else
|
||||
try
|
||||
{
|
||||
// Simian sends malformed urls like this:
|
||||
// http://valley.virtualportland.org/simtest/Grid/?id=
|
||||
//
|
||||
try
|
||||
Uri uri;
|
||||
|
||||
if (!serverURI.EndsWith("="))
|
||||
{
|
||||
Uri uri = new Uri(serverURI + "xxx");
|
||||
// Let's check if this is a valid URI, because it may not be
|
||||
uri = new Uri(serverURI);
|
||||
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Simian sends malformed urls like this:
|
||||
// http://valley.virtualportland.org/simtest/Grid/?id=
|
||||
//
|
||||
uri = new Uri(serverURI + "xxx");
|
||||
if (uri.Query == string.Empty)
|
||||
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
||||
else
|
||||
|
@ -66,10 +72,11 @@ namespace OpenSim.Services.Connectors
|
|||
m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/";
|
||||
}
|
||||
}
|
||||
catch (UriFormatException)
|
||||
{
|
||||
m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI);
|
||||
}
|
||||
|
||||
}
|
||||
catch (UriFormatException)
|
||||
{
|
||||
m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue