* Switches content type from application/xml+llsd to application/llsd+xml on outgoing requests.
* Monitors / for getting the seed cap for rez_avatar/request on application/llsd+xml && application/xml+llsd && !application/xml * Experimental, this might break LibOMV temporarily.0.6.0-stable
parent
48c2ef7e12
commit
a1217410e5
|
@ -650,7 +650,7 @@ namespace OpenSim.Framework.Servers
|
||||||
llsdResponse = GenerateNoLLSDHandlerResponse();
|
llsdResponse = GenerateNoLLSDHandlerResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
response.ContentType = "application/xml+llsd";
|
response.ContentType = "application/llsd+xml";
|
||||||
|
|
||||||
byte[] buffer = LLSDParser.SerializeXmlBytes(llsdResponse);
|
byte[] buffer = LLSDParser.SerializeXmlBytes(llsdResponse);
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
if (m_scene.Count == 0)
|
if (m_scene.Count == 0)
|
||||||
{
|
{
|
||||||
scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
|
scene.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
|
||||||
|
scene.AddLLSDHandler("/", ProcessAgentDomainMessage);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
|
ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
|
||||||
|
@ -200,9 +201,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
// /agent/*
|
// /agent/*
|
||||||
|
|
||||||
string[] pathSegments = path.Split('/');
|
string[] pathSegments = path.Split('/');
|
||||||
if (pathSegments.Length < 1)
|
if (pathSegments.Length <= 1)
|
||||||
{
|
{
|
||||||
return GenerateNoHandlerMessage();
|
return GenerateNoHandlerMessage();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pathSegments[0].Length == 0 && pathSegments[1].Length == 0)
|
||||||
|
{
|
||||||
|
return GenerateRezAvatarRequestMessage("");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
|
m_log.InfoFormat("[OGP]: path {0}, segments {1} segment[1] {2} Last segment {3}",
|
||||||
|
@ -239,6 +246,34 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
//return null;
|
//return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private LLSD GenerateRezAvatarRequestMessage(string regionname)
|
||||||
|
{
|
||||||
|
Scene region = GetRootScene();
|
||||||
|
RegionInfo reg = region.RegionInfo;
|
||||||
|
|
||||||
|
LLSDMap responseMap = new LLSDMap();
|
||||||
|
string rezHttpProtocol = "http://";
|
||||||
|
string regionCapsHttpProtocol = "http://";
|
||||||
|
string httpaddr = reg.ExternalHostName;
|
||||||
|
string urlport = reg.HttpPort.ToString();
|
||||||
|
string requestpath = "/agent/" + UUID.Zero + "/rez_avatar/request";
|
||||||
|
|
||||||
|
if (httpSSL)
|
||||||
|
{
|
||||||
|
rezHttpProtocol = "https://";
|
||||||
|
regionCapsHttpProtocol = "https://";
|
||||||
|
urlport = httpsslport.ToString();
|
||||||
|
|
||||||
|
if (httpsCN.Length > 0)
|
||||||
|
httpaddr = httpsCN;
|
||||||
|
}
|
||||||
|
|
||||||
|
responseMap["connect"] = LLSD.FromBoolean(true);
|
||||||
|
responseMap["rez_avatar/request"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + requestpath);
|
||||||
|
|
||||||
|
return responseMap;
|
||||||
|
}
|
||||||
|
|
||||||
// Using OpenSim.Framework.Communications.Capabilities.Caps here one time..
|
// Using OpenSim.Framework.Communications.Capabilities.Caps here one time..
|
||||||
// so the long name is probably better then a using statement
|
// so the long name is probably better then a using statement
|
||||||
public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps)
|
public void OnRegisterCaps(UUID agentID, OpenSim.Framework.Communications.Capabilities.Caps caps)
|
||||||
|
@ -393,7 +428,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
|
||||||
|
|
||||||
//string raCap = string.Empty;
|
//string raCap = string.Empty;
|
||||||
|
|
||||||
UUID AvatarRezCapUUID = UUID.Random();
|
UUID AvatarRezCapUUID = LocalAgentID;
|
||||||
string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez";
|
string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/rez";
|
||||||
string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez";
|
string derezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar/derez";
|
||||||
// Get a reference to the user's cap so we can pull out the Caps Object Path
|
// Get a reference to the user's cap so we can pull out the Caps Object Path
|
||||||
|
|
Loading…
Reference in New Issue