aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorBlueWall2011-12-05 15:29:00 -0500
committerBlueWall2011-12-05 15:29:00 -0500
commit2d3dda6db391d0b74459ba0b4d77e13078b76913 (patch)
treeb3391ff60a778b6809742cb0d1e53a67ece1b63c /OpenSim/Server
parentMerge branch 'master' of /home/opensim/var/repo/opensim (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-2d3dda6db391d0b74459ba0b4d77e13078b76913.zip
opensim-SC_OLD-2d3dda6db391d0b74459ba0b4d77e13078b76913.tar.gz
opensim-SC_OLD-2d3dda6db391d0b74459ba0b4d77e13078b76913.tar.bz2
opensim-SC_OLD-2d3dda6db391d0b74459ba0b4d77e13078b76913.tar.xz
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs34
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs2
2 files changed, 34 insertions, 2 deletions
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
45 base(config, server, configName) 45 base(config, server, configName)
46 { 46 {
47 server.AddStreamHandler(new HeloServerGetHandler("opensim-robust")); 47 server.AddStreamHandler(new HeloServerGetHandler("opensim-robust"));
48 server.AddStreamHandler(new HeloServerHeadHandler("opensim-robust"));
48 } 49 }
49 } 50 }
50 51
52 [Obsolete]
51 public class HeloServerGetHandler : BaseStreamHandler 53 public class HeloServerGetHandler : BaseStreamHandler
52 { 54 {
53 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 55 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -68,7 +70,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
68 70
69 private byte[] OKResponse(OSHttpResponse httpResponse) 71 private byte[] OKResponse(OSHttpResponse httpResponse)
70 { 72 {
71 m_log.Debug("[HELO]: hi, I was called"); 73 m_log.Debug("[HELO]: hi, GET was called");
72 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); 74 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType);
73 httpResponse.StatusCode = (int)HttpStatusCode.OK; 75 httpResponse.StatusCode = (int)HttpStatusCode.OK;
74 httpResponse.StatusDescription = "OK"; 76 httpResponse.StatusDescription = "OK";
@@ -76,4 +78,34 @@ namespace OpenSim.Server.Handlers.Hypergrid
76 } 78 }
77 79
78 } 80 }
81
82 public class HeloServerHeadHandler : BaseStreamHandler
83 {
84 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
85
86 private string m_HandlersType;
87
88 public HeloServerHeadHandler(string handlersType) :
89 base("HEAD", "/helo")
90 {
91 m_HandlersType = handlersType;
92 }
93
94 public override byte[] Handle(string path, Stream requestData,
95 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
96 {
97 return OKResponse(httpResponse);
98 }
99
100 private byte[] OKResponse(OSHttpResponse httpResponse)
101 {
102 m_log.Debug("[HELO]: hi, HEAD was called");
103 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType);
104 httpResponse.StatusCode = (int)HttpStatusCode.OK;
105 httpResponse.StatusDescription = "OK";
106 return new byte[0];
107 }
108
109 }
110
79} 111}
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
143 UUID.TryParse(sessionID_str, out sessionID); 143 UUID.TryParse(sessionID_str, out sessionID);
144 string gridName = (string)requestData["externalName"]; 144 string gridName = (string)requestData["externalName"];
145 145
146 bool success = m_HomeUsersService.AgentIsComingHome(sessionID, gridName); 146 bool success = m_HomeUsersService.IsAgentComingHome(sessionID, gridName);
147 147
148 Hashtable hash = new Hashtable(); 148 Hashtable hash = new Hashtable();
149 hash["result"] = success.ToString(); 149 hash["result"] = success.ToString();