aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs39
2 files changed, 38 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 264ffae..7bf8a3c 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -650,7 +650,7 @@ namespace OpenSim.Framework.Servers
650 llsdResponse = GenerateNoLLSDHandlerResponse(); 650 llsdResponse = GenerateNoLLSDHandlerResponse();
651 } 651 }
652 652
653 response.ContentType = "application/xml+llsd"; 653 response.ContentType = "application/llsd+xml";
654 654
655 byte[] buffer = LLSDParser.SerializeXmlBytes(llsdResponse); 655 byte[] buffer = LLSDParser.SerializeXmlBytes(llsdResponse);
656 656
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 687fa82..1fd559e 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -127,6 +127,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
127 if (m_scene.Count == 0) 127 if (m_scene.Count == 0)
128 { 128 {
129 scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage); 129 scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
130 scene.AddLLSDHandler("/", ProcessAgentDomainMessage);
130 try 131 try
131 { 132 {
132 ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; 133 ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
@@ -200,9 +201,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
200 // /agent/* 201 // /agent/*
201 202
202 string[] pathSegments = path.Split('/'); 203 string[] pathSegments = path.Split('/');
203 if (pathSegments.Length < 1) 204 if (pathSegments.Length <= 1)
204 { 205 {
205 return GenerateNoHandlerMessage(); 206 return GenerateNoHandlerMessage();
207
208 }
209
210 if (pathSegments[0].Length == 0 && pathSegments[1].Length == 0)
211 {
212 return GenerateRezAvatarRequestMessage("");
206 } 213 }
207 214
208 m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}", 215 m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
@@ -239,6 +246,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
239 //return null; 246 //return null;
240 } 247 }
241 248
249 private LLSD GenerateRezAvatarRequestMessage(string regionname)
250 {
251 Scene region = GetRootScene();
252 RegionInfo reg = region.RegionInfo;
253
254 LLSDMap responseMap = new LLSDMap();
255 string rezHttpProtocol = "http://";
256 string regionCapsHttpProtocol = "http://";
257 string httpaddr = reg.ExternalHostName;
258 string urlport = reg.HttpPort.ToString();
259 string requestpath = "/agent/" + UUID.Zero + "/rez_avatar/request";
260
261 if (httpSSL)
262 {
263 rezHttpProtocol = "https://";
264 regionCapsHttpProtocol = "https://";
265 urlport = httpsslport.ToString();
266
267 if (httpsCN.Length > 0)
268 httpaddr = httpsCN;
269 }
270
271 responseMap["connect"] = LLSD.FromBoolean(true);
272 responseMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
273
274 return responseMap;
275 }
276
242 // Using OpenSim.Framework.Communications.Capabilities.Caps here one time.. 277 // Using OpenSim.Framework.Communications.Capabilities.Caps here one time..
243 // so the long name is probably better then a using statement 278 // so the long name is probably better then a using statement
244 public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps) 279 public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps)
@@ -393,7 +428,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
393 428
394 //string raCap = string.Empty; 429 //string raCap = string.Empty;
395 430
396 UUID AvatarRezCapUUID = UUID.Random(); 431 UUID AvatarRezCapUUID = LocalAgentID;
397 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez"; 432 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez";
398 string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez"; 433 string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez";
399 // Get a reference to the user's cap so we can pull out the Caps Object Path 434 // Get a reference to the user's cap so we can pull out the Caps Object Path