Fix CAPS to work like they should - do not send caps to the viewer if they're not in the requested caps list.

The previous wrong behavior caused the debug setting "UseHTTPInventory" to fail
on all viewers when turned off. UDB inventory would not be correctly used in
that case.
This commit is contained in:
Melanie
2013-04-30 23:35:59 +02:00
parent 46ae84cfba
commit ac135c649c
3 changed files with 18 additions and 4 deletions

View File

@@ -273,11 +273,22 @@ namespace OpenSim.Region.ClientStack.Linden
return string.Empty;
}
Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true);
OSDArray capsRequested = (OSDArray)OSDParser.DeserializeLLSDXml(request);
List<string> validCaps = new List<string>();
foreach (OSD c in capsRequested)
validCaps.Add(c.AsString());
Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true, validCaps);
// Add the external too
foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers)
{
if (!validCaps.Contains(kvp.Key))
continue;
caps[kvp.Key] = kvp.Value;
}
string result = LLSDHelpers.SerialiseLLSDReply(caps);