From 34b7d7ec6e8fcdf3e42a17ded470b561578b6f4e Mon Sep 17 00:00:00 2001 From: uriesk Date: Sat, 8 Dec 2018 19:26:17 +0100 Subject: [PATCH] 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 --- .../Scripting/LSLHttp/UrlModule.cs | 31 ------------------- .../Shared/Api/Implementation/LSL_Api.cs | 13 -------- 2 files changed, 44 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 5e8cd8e37f..cb8d4c84c9 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -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) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8987a8da55..a63ce64085 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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)