From 080dfcc9c96c387599cf6734756a83e33a210553 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 4 Dec 2011 08:24:16 -0800 Subject: HG: Renamed one method --- OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs index 72a4aea..50010f2 100644 --- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs @@ -143,7 +143,7 @@ namespace OpenSim.Server.Handlers.Hypergrid UUID.TryParse(sessionID_str, out sessionID); string gridName = (string)requestData["externalName"]; - bool success = m_HomeUsersService.AgentIsComingHome(sessionID, gridName); + bool success = m_HomeUsersService.IsAgentComingHome(sessionID, gridName); Hashtable hash = new Hashtable(); hash["result"] = success.ToString(); -- cgit v1.1 From a2d98c72930594da2cd8056adf1e2be942051843 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 4 Dec 2011 10:10:09 -0800 Subject: HG: Added HEAD method to Helo service. This is the preferred method, but its wide use will have to wait a few releases. So the sims are still calling GET for now. --- .../Handlers/Hypergrid/HeloServerConnector.cs | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'OpenSim/Server/Handlers') diff --git a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs index 39baa32..4accea1 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs @@ -45,9 +45,11 @@ namespace OpenSim.Server.Handlers.Hypergrid base(config, server, configName) { server.AddStreamHandler(new HeloServerGetHandler("opensim-robust")); + server.AddStreamHandler(new HeloServerHeadHandler("opensim-robust")); } } + [Obsolete] public class HeloServerGetHandler : BaseStreamHandler { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -68,7 +70,7 @@ namespace OpenSim.Server.Handlers.Hypergrid private byte[] OKResponse(OSHttpResponse httpResponse) { - m_log.Debug("[HELO]: hi, I was called"); + m_log.Debug("[HELO]: hi, GET was called"); httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); httpResponse.StatusCode = (int)HttpStatusCode.OK; httpResponse.StatusDescription = "OK"; @@ -76,4 +78,34 @@ namespace OpenSim.Server.Handlers.Hypergrid } } + + public class HeloServerHeadHandler : BaseStreamHandler + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private string m_HandlersType; + + public HeloServerHeadHandler(string handlersType) : + base("HEAD", "/helo") + { + m_HandlersType = handlersType; + } + + public override byte[] Handle(string path, Stream requestData, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) + { + return OKResponse(httpResponse); + } + + private byte[] OKResponse(OSHttpResponse httpResponse) + { + m_log.Debug("[HELO]: hi, HEAD was called"); + httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); + httpResponse.StatusCode = (int)HttpStatusCode.OK; + httpResponse.StatusDescription = "OK"; + return new byte[0]; + } + + } + } -- cgit v1.1