diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 9 |
1 files changed, 3 insertions, 6 deletions
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 | |||
121 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" }); | 121 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" }); |
122 | return urlcode; | 122 | return urlcode; |
123 | } | 123 | } |
124 | string url = "http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+"/lslhttp/"+urlcode.ToString(); | 124 | string url = "http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+"/lslhttp/"+urlcode.ToString()+"/"; |
125 | 125 | ||
126 | UrlData urlData = new UrlData(); | 126 | UrlData urlData = new UrlData(); |
127 | urlData.hostID = host.UUID; | 127 | urlData.hostID = host.UUID; |
@@ -133,14 +133,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
133 | 133 | ||
134 | m_UrlMap[url] = urlData; | 134 | m_UrlMap[url] = urlData; |
135 | 135 | ||
136 | m_HttpServer.AddHTTPHandler("/lslhttp/"+urlcode.ToString(), HttpRequestHandler); | 136 | m_HttpServer.AddHTTPHandler("/lslhttp/"+urlcode.ToString()+"/", HttpRequestHandler); |
137 | 137 | ||
138 | m_log.DebugFormat("Posting event http_request to script with url {0}", url); | ||
139 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); | 138 | engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); |
140 | } | 139 | } |
141 | 140 | ||
142 | m_log.DebugFormat("Returning {0} to LSL", urlcode.ToString()); | ||
143 | |||
144 | return urlcode; | 141 | return urlcode; |
145 | } | 142 | } |
146 | 143 | ||
@@ -230,7 +227,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
230 | 227 | ||
231 | private void RemoveUrl(UrlData data) | 228 | private void RemoveUrl(UrlData data) |
232 | { | 229 | { |
233 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()); | 230 | m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); |
234 | } | 231 | } |
235 | 232 | ||
236 | private Hashtable HttpRequestHandler(Hashtable request) | 233 | private Hashtable HttpRequestHandler(Hashtable request) |