aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 7d2876c..a74032f 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -240,13 +240,16 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
240 240
241 private Hashtable HttpRequestHandler(Hashtable request) 241 private Hashtable HttpRequestHandler(Hashtable request)
242 { 242 {
243 foreach (KeyValuePair<string, Object> kvp in request) 243 string uri = request["uri"].ToString();
244 { 244 //A solution to this ugly mess would be to use only the /lslhttp/<UUID>/ part of the URI as the key.
245 m_log.DebugFormat("{0} = {1}", kvp.Key, kvp.Value.ToString()); 245 UrlData url = m_UrlMap["http://"+System.Environment.MachineName+":"+m_HttpServer.Port.ToString()+uri];
246 } 246
247 //UUID.Random() below is a hack! Eventually we will do HTTP requests and responses properly.
248 url.engine.PostScriptEvent(url.itemID, "http_request", new Object[] { UUID.Random().ToString(), request["http-method"].ToString(), request["body"].ToString() });
249
247 Hashtable response = new Hashtable(); 250 Hashtable response = new Hashtable();
248 response["int_response_code"] = 404; 251 response["int_response_code"] = 200;
249 response["str_response_string"] = "Test"; 252 response["str_response_string"] = "This is a generic response as OpenSim does not yet support proper responses. Your request has been passed to the object.";
250 253
251 return response; 254 return response;
252 } 255 }