aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
diff options
context:
space:
mode:
authorMelanie Thielker2009-07-22 22:16:37 +0000
committerMelanie Thielker2009-07-22 22:16:37 +0000
commit4b84bdb77ee07dc74cbf6f8d0ce3a4cb1a2f0437 (patch)
tree208d6285dacb507a9d85e745b8b02a7f26e39e4a /OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
parent* Fix SStats under the new HttpServer. (.ajax files are apparently reserved) (diff)
downloadopensim-SC_OLD-4b84bdb77ee07dc74cbf6f8d0ce3a4cb1a2f0437.zip
opensim-SC_OLD-4b84bdb77ee07dc74cbf6f8d0ce3a4cb1a2f0437.tar.gz
opensim-SC_OLD-4b84bdb77ee07dc74cbf6f8d0ce3a4cb1a2f0437.tar.bz2
opensim-SC_OLD-4b84bdb77ee07dc74cbf6f8d0ce3a4cb1a2f0437.tar.xz
Thank you, patnad, for a patch to advance the UrlModule's functionality.
Mantis #3712
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs')
-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 }