Remove OpenID cookie check (agni_sl_session_id) from *SetContentType Remove commented out second llSetContentType thats the same as osSetContentType anyway
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>0.9.1.0-post-fixes
parent
1610595697
commit
34b7d7ec6e
|
@ -69,7 +69,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
public int startTime;
|
||||
public bool responseSent;
|
||||
public string uri;
|
||||
public bool allowResponseType = false;
|
||||
public UUID hostID;
|
||||
public Scene scene;
|
||||
}
|
||||
|
@ -383,10 +382,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
{
|
||||
string responseBody = body;
|
||||
|
||||
// If we have no OpenID from built-in browser, disable this
|
||||
if (!urlData.requests[request].allowResponseType)
|
||||
urlData.requests[request].responseType = "text/plain";
|
||||
|
||||
if (urlData.requests[request].responseType.Equals("text/plain"))
|
||||
{
|
||||
string value;
|
||||
|
@ -703,32 +698,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
|||
string key = (string)header.Key;
|
||||
string value = (string)header.Value;
|
||||
requestData.headers.Add(key, value);
|
||||
if (key == "cookie")
|
||||
{
|
||||
string[] parts = value.Split(new char[] {'='});
|
||||
if (parts[0] == "agni_sl_session_id" && parts.Length > 1)
|
||||
{
|
||||
string cookie = Uri.UnescapeDataString(parts[1]);
|
||||
string[] crumbs = cookie.Split(new char[] {':'});
|
||||
UUID owner;
|
||||
if (crumbs.Length == 2 && UUID.TryParse(crumbs[0], out owner))
|
||||
{
|
||||
if (crumbs[1].Length == 32)
|
||||
{
|
||||
Scene scene = requestData.scene;
|
||||
if (scene != null)
|
||||
{
|
||||
SceneObjectPart host = scene.GetSceneObjectPart(requestData.hostID);
|
||||
if (host != null)
|
||||
{
|
||||
if (host.OwnerID == owner)
|
||||
requestData.allowResponseType = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (DictionaryEntry de in request)
|
||||
{
|
||||
|
|
|
@ -2041,19 +2041,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public void llSetContentType(LSL_Key id, LSL_Integer content_type)
|
||||
{
|
||||
if (m_UrlModule != null)
|
||||
{
|
||||
string type = "text.plain";
|
||||
if (content_type == (int)ScriptBaseClass.CONTENT_TYPE_HTML)
|
||||
type = "text/html";
|
||||
|
||||
m_UrlModule.HttpContentType(new UUID(id),type);
|
||||
}
|
||||
}
|
||||
*/
|
||||
public void SetTexGen(SceneObjectPart part, int face,int style)
|
||||
{
|
||||
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
|
||||
|
|
Loading…
Reference in New Issue