Better (amend to previous commit)
parent
c0fd09b445
commit
86105a1533
|
@ -47,16 +47,22 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public HeloServicesConnector(string serverURI)
|
public HeloServicesConnector(string serverURI)
|
||||||
{
|
{
|
||||||
if (!serverURI.EndsWith("="))
|
try
|
||||||
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// Simian sends malformed urls like this:
|
Uri uri;
|
||||||
// http://valley.virtualportland.org/simtest/Grid/?id=
|
|
||||||
//
|
if (!serverURI.EndsWith("="))
|
||||||
try
|
|
||||||
{
|
{
|
||||||
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)
|
if (uri.Query == string.Empty)
|
||||||
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
|
||||||
else
|
else
|
||||||
|
@ -66,10 +72,11 @@ namespace OpenSim.Services.Connectors
|
||||||
m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/";
|
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