aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-13 20:57:26 +0000
committerMelanie Thielker2009-05-13 20:57:26 +0000
commit13298fef0b7c3731395d0ad95b5bd7c486ccaa05 (patch)
tree392653878c8d963c5d7b32ba7e325bb7a4cf90b1
parentAdd the port to the generated URL. For some reson this still doesn't want to (diff)
downloadopensim-SC-13298fef0b7c3731395d0ad95b5bd7c486ccaa05.zip
opensim-SC-13298fef0b7c3731395d0ad95b5bd7c486ccaa05.tar.gz
opensim-SC-13298fef0b7c3731395d0ad95b5bd7c486ccaa05.tar.bz2
opensim-SC-13298fef0b7c3731395d0ad95b5bd7c486ccaa05.tar.xz
Fix up some URL details
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs9
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)