diff options
author | UbitUmarov | 2018-12-01 23:13:24 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-01 23:13:24 +0000 |
commit | 4ced4fed33c35599502c67a060139475fadafdb6 (patch) | |
tree | bc64d0439e461af4a264132daf7001e3c9f04c29 /OpenSim/Framework | |
parent | clean a bit (diff) | |
download | opensim-SC-4ced4fed33c35599502c67a060139475fadafdb6.zip opensim-SC-4ced4fed33c35599502c67a060139475fadafdb6.tar.gz opensim-SC-4ced4fed33c35599502c67a060139475fadafdb6.tar.bz2 opensim-SC-4ced4fed33c35599502c67a060139475fadafdb6.tar.xz |
replace GetMeshModule and GetTextureModule
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceEventArgs.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs | 17 |
2 files changed, 8 insertions, 13 deletions
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 | |||
56 | LslHttp = 1, | 56 | LslHttp = 1, |
57 | Inventory = 2, | 57 | Inventory = 2, |
58 | Texture = 3, | 58 | Texture = 3, |
59 | Mesh = 4 | 59 | Mesh = 4, |
60 | Mesh2 = 5, | ||
61 | Asset = 6 | ||
60 | } | 62 | } |
61 | 63 | ||
62 | public string Url { get; set; } | 64 | 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 | |||
91 | 91 | ||
92 | response.SendChunked = false; | 92 | response.SendChunked = false; |
93 | response.ContentLength64 = buffer.Length; | 93 | response.ContentLength64 = buffer.Length; |
94 | response.ContentEncoding = Encoding.UTF8; | ||
95 | 94 | ||
96 | try | 95 | try |
97 | { | 96 | { |
@@ -118,7 +117,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
118 | { | 117 | { |
119 | int responsecode; | 118 | int responsecode; |
120 | string responseString = String.Empty; | 119 | string responseString = String.Empty; |
121 | byte[] responseData = null; | 120 | byte[] responseBytes = null; |
122 | string contentType; | 121 | string contentType; |
123 | 122 | ||
124 | if (responsedata == null) | 123 | if (responsedata == null) |
@@ -134,8 +133,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
134 | { | 133 | { |
135 | //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); | 134 | //m_log.Info("[BASE HTTP SERVER]: Doing HTTP Grunt work with response"); |
136 | responsecode = (int)responsedata["int_response_code"]; | 135 | responsecode = (int)responsedata["int_response_code"]; |
136 | |||
137 | if (responsedata["bin_response_data"] != null) | 137 | if (responsedata["bin_response_data"] != null) |
138 | responseData = (byte[])responsedata["bin_response_data"]; | 138 | responseBytes = (byte[])responsedata["bin_response_data"]; |
139 | else | 139 | else |
140 | responseString = (string)responsedata["str_response_string"]; | 140 | responseString = (string)responsedata["str_response_string"]; |
141 | contentType = (string)responsedata["content_type"]; | 141 | contentType = (string)responsedata["content_type"]; |
@@ -170,9 +170,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
170 | if (responsedata.ContainsKey("access_control_allow_origin")) | 170 | if (responsedata.ContainsKey("access_control_allow_origin")) |
171 | response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]); | 171 | response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]); |
172 | 172 | ||
173 | //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this | ||
174 | //and should check for NullReferenceExceptions | ||
175 | |||
176 | if (string.IsNullOrEmpty(contentType)) | 173 | if (string.IsNullOrEmpty(contentType)) |
177 | { | 174 | { |
178 | contentType = "text/html"; | 175 | contentType = "text/html"; |
@@ -185,7 +182,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
185 | if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently) | 182 | if (responsecode == (int)OSHttpStatusCode.RedirectMovedPermanently) |
186 | { | 183 | { |
187 | response.RedirectLocation = (string)responsedata["str_redirect_location"]; | 184 | response.RedirectLocation = (string)responsedata["str_redirect_location"]; |
188 | response.StatusCode = responsecode; | ||
189 | } | 185 | } |
190 | 186 | ||
191 | response.AddHeader("Content-Type", contentType); | 187 | response.AddHeader("Content-Type", contentType); |
@@ -199,9 +195,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
199 | 195 | ||
200 | byte[] buffer; | 196 | byte[] buffer; |
201 | 197 | ||
202 | if (responseData != null) | 198 | if (responseBytes != null) |
203 | { | 199 | { |
204 | buffer = responseData; | 200 | buffer = responseBytes; |
205 | } | 201 | } |
206 | else | 202 | else |
207 | { | 203 | { |
@@ -218,9 +214,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
218 | // Binary! | 214 | // Binary! |
219 | buffer = Convert.FromBase64String(responseString); | 215 | buffer = Convert.FromBase64String(responseString); |
220 | } | 216 | } |
221 | |||
222 | response.SendChunked = false; | ||
223 | response.ContentLength64 = buffer.Length; | ||
224 | response.ContentEncoding = Encoding.UTF8; | 217 | response.ContentEncoding = Encoding.UTF8; |
225 | } | 218 | } |
226 | 219 | ||