diff options
author | Justin Clark-Casey (justincc) | 2012-08-29 23:16:16 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-29 23:16:16 +0100 |
commit | 1f88179a65d3ac82883614f981a081a45c178be9 (patch) | |
tree | 2a3a0be26a6e440e59cb216ea39d825b263c8982 /OpenSim/Region/CoreModules | |
parent | Add VectorRenderModuleStressTests that contains a long running test that gene... (diff) | |
parent | This partially implements the LSL function to set the response (diff) | |
download | opensim-SC_OLD-1f88179a65d3ac82883614f981a081a45c178be9.zip opensim-SC_OLD-1f88179a65d3ac82883614f981a081a45c178be9.tar.gz opensim-SC_OLD-1f88179a65d3ac82883614f981a081a45c178be9.tar.bz2 opensim-SC_OLD-1f88179a65d3ac82883614f981a081a45c178be9.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 05d54f0..53a9679 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -84,6 +84,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
84 | public string body; | 84 | public string body; |
85 | public int responseCode; | 85 | public int responseCode; |
86 | public string responseBody; | 86 | public string responseBody; |
87 | public string responseType = "text/plain"; | ||
87 | //public ManualResetEvent ev; | 88 | //public ManualResetEvent ev; |
88 | public bool requestDone; | 89 | public bool requestDone; |
89 | public int startTime; | 90 | public int startTime; |
@@ -302,6 +303,22 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
302 | } | 303 | } |
303 | } | 304 | } |
304 | 305 | ||
306 | public void HttpContentType(UUID request, string type) | ||
307 | { | ||
308 | lock (m_UrlMap) | ||
309 | { | ||
310 | if (m_RequestMap.ContainsKey(request)) | ||
311 | { | ||
312 | UrlData urlData = m_RequestMap[request]; | ||
313 | urlData.requests[request].responseType = type; | ||
314 | } | ||
315 | else | ||
316 | { | ||
317 | m_log.Info("[HttpRequestHandler] There is no http-in request with id " + request.ToString()); | ||
318 | } | ||
319 | } | ||
320 | } | ||
321 | |||
305 | public void HttpResponse(UUID request, int status, string body) | 322 | public void HttpResponse(UUID request, int status, string body) |
306 | { | 323 | { |
307 | lock (m_UrlMap) | 324 | lock (m_UrlMap) |
@@ -504,7 +521,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
504 | //put response | 521 | //put response |
505 | response["int_response_code"] = requestData.responseCode; | 522 | response["int_response_code"] = requestData.responseCode; |
506 | response["str_response_string"] = requestData.responseBody; | 523 | response["str_response_string"] = requestData.responseBody; |
507 | response["content_type"] = "text/plain"; | 524 | response["content_type"] = requestData.responseType; |
525 | // response["content_type"] = "text/plain"; | ||
508 | response["keepalive"] = false; | 526 | response["keepalive"] = false; |
509 | response["reusecontext"] = false; | 527 | response["reusecontext"] = false; |
510 | 528 | ||