From 4ced4fed33c35599502c67a060139475fadafdb6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 1 Dec 2018 23:13:24 +0000 Subject: replace GetMeshModule and GetTextureModule --- .../Servers/HttpServer/PollServiceEventArgs.cs | 4 +++- .../Servers/HttpServer/PollServiceHttpRequest.cs | 17 +++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs index 7c7d08d..ed7c081 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs @@ -56,7 +56,9 @@ namespace OpenSim.Framework.Servers.HttpServer LslHttp = 1, Inventory = 2, Texture = 3, - Mesh = 4 + Mesh = 4, + Mesh2 = 5, + Asset = 6 } public string Url { get; set; } diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index beeef70..cf4f835 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs @@ -91,7 +91,6 @@ namespace OpenSim.Framework.Servers.HttpServer response.SendChunked = false; response.ContentLength64 = buffer.Length; - response.ContentEncoding = Encoding.UTF8; try { @@ -118,7 +117,7 @@ namespace OpenSim.Framework.Servers.HttpServer { int responsecode; string responseString = String.Empty; - byte[] responseData = null; + byte[] responseBytes = null; string contentType; if (responsedata == null) @@ -134,8 +133,9 @@ namespace OpenSim.Framework.Servers.HttpServer { //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); responsecode = (int)responsedata["int_response_code"]; + if (responsedata["bin_response_data"] != null) - responseData = (byte[])responsedata["bin_response_data"]; + responseBytes = (byte[])responsedata["bin_response_data"]; else responseString = (string)responsedata["str_response_string"]; contentType = (string)responsedata["content_type"]; @@ -170,9 +170,6 @@ namespace OpenSim.Framework.Servers.HttpServer if (responsedata.ContainsKey("access_control_allow_origin")) response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]); - //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this - //and should check for NullReferenceExceptions - if (string.IsNullOrEmpty(contentType)) { contentType = "text/html"; @@ -185,7 +182,6 @@ namespace OpenSim.Framework.Servers.HttpServer if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently) { response.RedirectLocation = (string)responsedata["str_redirect_location"]; - response.StatusCode = responsecode; } response.AddHeader("Content-Type", contentType); @@ -199,9 +195,9 @@ namespace OpenSim.Framework.Servers.HttpServer byte[] buffer; - if (responseData != null) + if (responseBytes != null) { - buffer = responseData; + buffer = responseBytes; } else { @@ -218,9 +214,6 @@ namespace OpenSim.Framework.Servers.HttpServer // Binary! buffer = Convert.FromBase64String(responseString); } - - response.SendChunked = false; - response.ContentLength64 = buffer.Length; response.ContentEncoding = Encoding.UTF8; } -- cgit v1.1