diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-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 | ||