From 26bb95fe3d5239c183bc3b312ef05e73fc06749c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 23 Dec 2011 10:58:30 -0800 Subject: HG: AAdded a few missing /'s at the end of URLs --- OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs index 7cfd6e8..ff1dd5f 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs @@ -53,7 +53,7 @@ namespace OpenSim.Services.Connectors public virtual string Helo() { - HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI + "/helo"); + HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI + "/helo/"); // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ -- cgit v1.1 From b6cfe15c7c0b3697709179cbbf32818576919642 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 24 Dec 2011 07:44:26 -0800 Subject: HG: more / love for Xmas --- .../Connectors/Hypergrid/HeloServiceConnector.cs | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs index ff1dd5f..8ac89cc 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs @@ -47,13 +47,36 @@ namespace OpenSim.Services.Connectors public HeloServicesConnector(string serverURI) { - m_ServerURI = serverURI.TrimEnd('/'); + if (!serverURI.EndsWith("=")) + m_ServerURI = serverURI.TrimEnd('/') + "/helo/"; + else + { + // Simian sends malformed urls like this: + // http://valley.virtualportland.org/simtest/Grid/?id= + // + try + { + Uri uri = new Uri(serverURI + "xxx"); + if (uri.Query == string.Empty) + m_ServerURI = serverURI.TrimEnd('/') + "/helo/"; + else + { + serverURI = serverURI + "xxx"; + m_ServerURI = serverURI.Replace("?" + uri.Query, ""); + m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/"; + } + } + catch (UriFormatException e) + { + m_log.WarnFormat("[HELO SERVICE]: Malformed URL {0}", serverURI); + } + } } public virtual string Helo() { - HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI + "/helo/"); + HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ -- cgit v1.1 From 70e36ee2b41da03e41b4f61ab348bc85bd872801 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 29 Dec 2011 12:17:58 -0800 Subject: HG: more adjustments for making HG Simian work. Added server_uri as new key on get_agent_home in UAS. --- OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs index 8ac89cc..c030bca 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServiceConnector.cs @@ -62,7 +62,7 @@ namespace OpenSim.Services.Connectors else { serverURI = serverURI + "xxx"; - m_ServerURI = serverURI.Replace("?" + uri.Query, ""); + m_ServerURI = serverURI.Replace(uri.Query, ""); m_ServerURI = m_ServerURI.TrimEnd('/') + "/helo/"; } } -- cgit v1.1