From 13298fef0b7c3731395d0ad95b5bd7c486ccaa05 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 13 May 2009 20:57:26 +0000 Subject: Fix up some URL details --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs') diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 142df4c..e808cb2 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" }); return urlcode; } - string url = "http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+"/lslhttp/"+urlcode.ToString(); + string url = "http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+"/lslhttp/"+urlcode.ToString()+"/"; UrlData urlData = new UrlData(); urlData.hostID = host.UUID; @@ -133,14 +133,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp m_UrlMap[url] = urlData; - m_HttpServer.AddHTTPHandler("/lslhttp/"+urlcode.ToString(), HttpRequestHandler); + m_HttpServer.AddHTTPHandler("/lslhttp/"+urlcode.ToString()+"/", HttpRequestHandler); - m_log.DebugFormat("Posting event http_request to script with url {0}", url); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); } - m_log.DebugFormat("Returning {0} to LSL", urlcode.ToString()); - return urlcode; } @@ -230,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp private void RemoveUrl(UrlData data) { - m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()); + m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); } private Hashtable HttpRequestHandler(Hashtable request) -- cgit v1.1