diff options
author | Justin Clark-Casey (justincc) | 2012-07-13 01:03:28 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-13 01:03:28 +0100 |
commit | 884d603cac6c3fe0cdbd199e13e1514146ff82bc (patch) | |
tree | 00701964cd4053700c5f37c48c8a5196928b00d1 /OpenSim/Server | |
parent | Don't cache regions data on the other unused LocalGridServiceConnector that t... (diff) | |
download | opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.zip opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.gz opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.bz2 opensim-SC-884d603cac6c3fe0cdbd199e13e1514146ff82bc.tar.xz |
Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
Diffstat (limited to 'OpenSim/Server')
9 files changed, 61 insertions, 74 deletions
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs index a19b599..6b93cd9 100644 --- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs | |||
@@ -321,8 +321,7 @@ namespace OpenSim.Server.Handlers.Authentication | |||
321 | private byte[] ResultToBytes(Dictionary<string, object> result) | 321 | private byte[] ResultToBytes(Dictionary<string, object> result) |
322 | { | 322 | { |
323 | string xmlString = ServerUtils.BuildXmlResponse(result); | 323 | string xmlString = ServerUtils.BuildXmlResponse(result); |
324 | UTF8Encoding encoding = new UTF8Encoding(); | 324 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
325 | return encoding.GetBytes(xmlString); | ||
326 | } | 325 | } |
327 | } | 326 | } |
328 | } | 327 | } |
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs index 3ee405c..393584e 100644 --- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs | |||
@@ -121,8 +121,7 @@ namespace OpenSim.Server.Handlers.Avatar | |||
121 | 121 | ||
122 | string xmlString = ServerUtils.BuildXmlResponse(result); | 122 | string xmlString = ServerUtils.BuildXmlResponse(result); |
123 | 123 | ||
124 | UTF8Encoding encoding = new UTF8Encoding(); | 124 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
125 | return encoding.GetBytes(xmlString); | ||
126 | } | 125 | } |
127 | 126 | ||
128 | return FailureResult(); | 127 | return FailureResult(); |
diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs index ef9b96f..47a8558 100644 --- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | |||
@@ -152,10 +152,9 @@ namespace OpenSim.Server.Handlers.Friends | |||
152 | } | 152 | } |
153 | 153 | ||
154 | string xmlString = ServerUtils.BuildXmlResponse(result); | 154 | string xmlString = ServerUtils.BuildXmlResponse(result); |
155 | //m_log.DebugFormat("[FRIENDS HANDLER]: resp string: {0}", xmlString); | ||
156 | UTF8Encoding encoding = new UTF8Encoding(); | ||
157 | return encoding.GetBytes(xmlString); | ||
158 | 155 | ||
156 | //m_log.DebugFormat("[FRIENDS HANDLER]: resp string: {0}", xmlString); | ||
157 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
159 | } | 158 | } |
160 | 159 | ||
161 | byte[] StoreFriend(Dictionary<string, object> request) | 160 | byte[] StoreFriend(Dictionary<string, object> request) |
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index 91d14cb..ef5f33e 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -226,10 +226,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
226 | } | 226 | } |
227 | 227 | ||
228 | string xmlString = ServerUtils.BuildXmlResponse(result); | 228 | string xmlString = ServerUtils.BuildXmlResponse(result); |
229 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
230 | UTF8Encoding encoding = new UTF8Encoding(); | ||
231 | return encoding.GetBytes(xmlString); | ||
232 | 229 | ||
230 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
231 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
233 | } | 232 | } |
234 | 233 | ||
235 | byte[] GetRegionByUUID(Dictionary<string, object> request) | 234 | byte[] GetRegionByUUID(Dictionary<string, object> request) |
@@ -256,9 +255,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
256 | result["result"] = rinfo.ToKeyValuePairs(); | 255 | result["result"] = rinfo.ToKeyValuePairs(); |
257 | 256 | ||
258 | string xmlString = ServerUtils.BuildXmlResponse(result); | 257 | string xmlString = ServerUtils.BuildXmlResponse(result); |
258 | |||
259 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 259 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
260 | UTF8Encoding encoding = new UTF8Encoding(); | 260 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
261 | return encoding.GetBytes(xmlString); | ||
262 | } | 261 | } |
263 | 262 | ||
264 | byte[] GetRegionByPosition(Dictionary<string, object> request) | 263 | byte[] GetRegionByPosition(Dictionary<string, object> request) |
@@ -289,9 +288,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
289 | result["result"] = rinfo.ToKeyValuePairs(); | 288 | result["result"] = rinfo.ToKeyValuePairs(); |
290 | 289 | ||
291 | string xmlString = ServerUtils.BuildXmlResponse(result); | 290 | string xmlString = ServerUtils.BuildXmlResponse(result); |
291 | |||
292 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 292 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
293 | UTF8Encoding encoding = new UTF8Encoding(); | 293 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
294 | return encoding.GetBytes(xmlString); | ||
295 | } | 294 | } |
296 | 295 | ||
297 | byte[] GetRegionByName(Dictionary<string, object> request) | 296 | byte[] GetRegionByName(Dictionary<string, object> request) |
@@ -318,9 +317,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
318 | result["result"] = rinfo.ToKeyValuePairs(); | 317 | result["result"] = rinfo.ToKeyValuePairs(); |
319 | 318 | ||
320 | string xmlString = ServerUtils.BuildXmlResponse(result); | 319 | string xmlString = ServerUtils.BuildXmlResponse(result); |
320 | |||
321 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 321 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
322 | UTF8Encoding encoding = new UTF8Encoding(); | 322 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
323 | return encoding.GetBytes(xmlString); | ||
324 | } | 323 | } |
325 | 324 | ||
326 | byte[] GetRegionsByName(Dictionary<string, object> request) | 325 | byte[] GetRegionsByName(Dictionary<string, object> request) |
@@ -361,9 +360,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
361 | } | 360 | } |
362 | 361 | ||
363 | string xmlString = ServerUtils.BuildXmlResponse(result); | 362 | string xmlString = ServerUtils.BuildXmlResponse(result); |
363 | |||
364 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 364 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
365 | UTF8Encoding encoding = new UTF8Encoding(); | 365 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
366 | return encoding.GetBytes(xmlString); | ||
367 | } | 366 | } |
368 | 367 | ||
369 | byte[] GetRegionRange(Dictionary<string, object> request) | 368 | byte[] GetRegionRange(Dictionary<string, object> request) |
@@ -410,9 +409,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
410 | } | 409 | } |
411 | } | 410 | } |
412 | string xmlString = ServerUtils.BuildXmlResponse(result); | 411 | string xmlString = ServerUtils.BuildXmlResponse(result); |
412 | |||
413 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 413 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
414 | UTF8Encoding encoding = new UTF8Encoding(); | 414 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
415 | return encoding.GetBytes(xmlString); | ||
416 | } | 415 | } |
417 | 416 | ||
418 | byte[] GetDefaultRegions(Dictionary<string, object> request) | 417 | byte[] GetDefaultRegions(Dictionary<string, object> request) |
@@ -440,9 +439,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
440 | } | 439 | } |
441 | } | 440 | } |
442 | string xmlString = ServerUtils.BuildXmlResponse(result); | 441 | string xmlString = ServerUtils.BuildXmlResponse(result); |
442 | |||
443 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 443 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
444 | UTF8Encoding encoding = new UTF8Encoding(); | 444 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
445 | return encoding.GetBytes(xmlString); | ||
446 | } | 445 | } |
447 | 446 | ||
448 | byte[] GetFallbackRegions(Dictionary<string, object> request) | 447 | byte[] GetFallbackRegions(Dictionary<string, object> request) |
@@ -481,9 +480,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
481 | } | 480 | } |
482 | } | 481 | } |
483 | string xmlString = ServerUtils.BuildXmlResponse(result); | 482 | string xmlString = ServerUtils.BuildXmlResponse(result); |
483 | |||
484 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 484 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
485 | UTF8Encoding encoding = new UTF8Encoding(); | 485 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
486 | return encoding.GetBytes(xmlString); | ||
487 | } | 486 | } |
488 | 487 | ||
489 | byte[] GetHyperlinks(Dictionary<string, object> request) | 488 | byte[] GetHyperlinks(Dictionary<string, object> request) |
@@ -511,9 +510,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
511 | } | 510 | } |
512 | } | 511 | } |
513 | string xmlString = ServerUtils.BuildXmlResponse(result); | 512 | string xmlString = ServerUtils.BuildXmlResponse(result); |
513 | |||
514 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 514 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
515 | UTF8Encoding encoding = new UTF8Encoding(); | 515 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
516 | return encoding.GetBytes(xmlString); | ||
517 | } | 516 | } |
518 | 517 | ||
519 | byte[] GetRegionFlags(Dictionary<string, object> request) | 518 | byte[] GetRegionFlags(Dictionary<string, object> request) |
@@ -537,12 +536,11 @@ namespace OpenSim.Server.Handlers.Grid | |||
537 | result["result"] = flags.ToString(); | 536 | result["result"] = flags.ToString(); |
538 | 537 | ||
539 | string xmlString = ServerUtils.BuildXmlResponse(result); | 538 | string xmlString = ServerUtils.BuildXmlResponse(result); |
539 | |||
540 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 540 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
541 | UTF8Encoding encoding = new UTF8Encoding(); | 541 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
542 | return encoding.GetBytes(xmlString); | ||
543 | } | 542 | } |
544 | 543 | ||
545 | |||
546 | #endregion | 544 | #endregion |
547 | 545 | ||
548 | #region Misc | 546 | #region Misc |
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index bf21255..687cf8d 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -117,10 +117,9 @@ namespace OpenSim.Server.Handlers.GridUser | |||
117 | result["result"] = guinfo.ToKeyValuePairs(); | 117 | result["result"] = guinfo.ToKeyValuePairs(); |
118 | 118 | ||
119 | string xmlString = ServerUtils.BuildXmlResponse(result); | 119 | string xmlString = ServerUtils.BuildXmlResponse(result); |
120 | //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); | ||
121 | UTF8Encoding encoding = new UTF8Encoding(); | ||
122 | return encoding.GetBytes(xmlString); | ||
123 | 120 | ||
121 | //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); | ||
122 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
124 | } | 123 | } |
125 | 124 | ||
126 | byte[] LoggedOut(Dictionary<string, object> request) | 125 | byte[] LoggedOut(Dictionary<string, object> request) |
@@ -189,10 +188,9 @@ namespace OpenSim.Server.Handlers.GridUser | |||
189 | result["result"] = guinfo.ToKeyValuePairs(); | 188 | result["result"] = guinfo.ToKeyValuePairs(); |
190 | 189 | ||
191 | string xmlString = ServerUtils.BuildXmlResponse(result); | 190 | string xmlString = ServerUtils.BuildXmlResponse(result); |
192 | //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); | ||
193 | UTF8Encoding encoding = new UTF8Encoding(); | ||
194 | return encoding.GetBytes(xmlString); | ||
195 | 191 | ||
192 | //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); | ||
193 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
196 | } | 194 | } |
197 | 195 | ||
198 | byte[] GetGridUserInfos(Dictionary<string, object> request) | 196 | byte[] GetGridUserInfos(Dictionary<string, object> request) |
@@ -231,8 +229,7 @@ namespace OpenSim.Server.Handlers.GridUser | |||
231 | } | 229 | } |
232 | 230 | ||
233 | string xmlString = ServerUtils.BuildXmlResponse(result); | 231 | string xmlString = ServerUtils.BuildXmlResponse(result); |
234 | UTF8Encoding encoding = new UTF8Encoding(); | 232 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
235 | return encoding.GetBytes(xmlString); | ||
236 | } | 233 | } |
237 | 234 | ||
238 | private bool UnpackArgs(Dictionary<string, object> request, out string user, out UUID region, out Vector3 position, out Vector3 lookAt) | 235 | private bool UnpackArgs(Dictionary<string, object> request, out string user, out UUID region, out Vector3 position, out Vector3 lookAt) |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index c2f127c..0aa2729 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs | |||
@@ -279,13 +279,11 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
279 | } | 279 | } |
280 | 280 | ||
281 | string xmlString = ServerUtils.BuildXmlResponse(result); | 281 | string xmlString = ServerUtils.BuildXmlResponse(result); |
282 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
283 | UTF8Encoding encoding = new UTF8Encoding(); | ||
284 | return encoding.GetBytes(xmlString); | ||
285 | 282 | ||
283 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | ||
284 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); | ||
286 | } | 285 | } |
287 | 286 | ||
288 | |||
289 | #endregion | 287 | #endregion |
290 | 288 | ||
291 | #region Misc | 289 | #region Misc |
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index cb9b65d..64127c2 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -217,9 +217,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
217 | result["RESULT"] = "False"; | 217 | result["RESULT"] = "False"; |
218 | 218 | ||
219 | string xmlString = ServerUtils.BuildXmlResponse(result); | 219 | string xmlString = ServerUtils.BuildXmlResponse(result); |
220 | |||
220 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 221 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
221 | UTF8Encoding encoding = new UTF8Encoding(); | 222 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
222 | return encoding.GetBytes(xmlString); | ||
223 | } | 223 | } |
224 | 224 | ||
225 | byte[] HandleGetInventorySkeleton(Dictionary<string,object> request) | 225 | byte[] HandleGetInventorySkeleton(Dictionary<string,object> request) |
@@ -245,9 +245,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
245 | result["FOLDERS"] = sfolders; | 245 | result["FOLDERS"] = sfolders; |
246 | 246 | ||
247 | string xmlString = ServerUtils.BuildXmlResponse(result); | 247 | string xmlString = ServerUtils.BuildXmlResponse(result); |
248 | |||
248 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 249 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
249 | UTF8Encoding encoding = new UTF8Encoding(); | 250 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
250 | return encoding.GetBytes(xmlString); | ||
251 | } | 251 | } |
252 | 252 | ||
253 | byte[] HandleGetUserInventory(Dictionary<string, object> request) | 253 | byte[] HandleGetUserInventory(Dictionary<string, object> request) |
@@ -284,9 +284,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
284 | } | 284 | } |
285 | 285 | ||
286 | string xmlString = ServerUtils.BuildXmlResponse(result); | 286 | string xmlString = ServerUtils.BuildXmlResponse(result); |
287 | |||
287 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 288 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
288 | UTF8Encoding encoding = new UTF8Encoding(); | 289 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
289 | return encoding.GetBytes(xmlString); | ||
290 | } | 290 | } |
291 | 291 | ||
292 | byte[] HandleGetRootFolder(Dictionary<string,object> request) | 292 | byte[] HandleGetRootFolder(Dictionary<string,object> request) |
@@ -300,9 +300,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
300 | result["folder"] = EncodeFolder(rfolder); | 300 | result["folder"] = EncodeFolder(rfolder); |
301 | 301 | ||
302 | string xmlString = ServerUtils.BuildXmlResponse(result); | 302 | string xmlString = ServerUtils.BuildXmlResponse(result); |
303 | |||
303 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 304 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
304 | UTF8Encoding encoding = new UTF8Encoding(); | 305 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
305 | return encoding.GetBytes(xmlString); | ||
306 | } | 306 | } |
307 | 307 | ||
308 | byte[] HandleGetFolderForType(Dictionary<string,object> request) | 308 | byte[] HandleGetFolderForType(Dictionary<string,object> request) |
@@ -317,9 +317,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
317 | result["folder"] = EncodeFolder(folder); | 317 | result["folder"] = EncodeFolder(folder); |
318 | 318 | ||
319 | string xmlString = ServerUtils.BuildXmlResponse(result); | 319 | string xmlString = ServerUtils.BuildXmlResponse(result); |
320 | |||
320 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 321 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
321 | UTF8Encoding encoding = new UTF8Encoding(); | 322 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
322 | return encoding.GetBytes(xmlString); | ||
323 | } | 323 | } |
324 | 324 | ||
325 | byte[] HandleGetFolderContent(Dictionary<string,object> request) | 325 | byte[] HandleGetFolderContent(Dictionary<string,object> request) |
@@ -358,9 +358,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
358 | } | 358 | } |
359 | 359 | ||
360 | string xmlString = ServerUtils.BuildXmlResponse(result); | 360 | string xmlString = ServerUtils.BuildXmlResponse(result); |
361 | |||
361 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 362 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
362 | UTF8Encoding encoding = new UTF8Encoding(); | 363 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
363 | return encoding.GetBytes(xmlString); | ||
364 | } | 364 | } |
365 | 365 | ||
366 | byte[] HandleGetFolderItems(Dictionary<string,object> request) | 366 | byte[] HandleGetFolderItems(Dictionary<string,object> request) |
@@ -386,9 +386,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
386 | result["ITEMS"] = sitems; | 386 | result["ITEMS"] = sitems; |
387 | 387 | ||
388 | string xmlString = ServerUtils.BuildXmlResponse(result); | 388 | string xmlString = ServerUtils.BuildXmlResponse(result); |
389 | |||
389 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 390 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
390 | UTF8Encoding encoding = new UTF8Encoding(); | 391 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
391 | return encoding.GetBytes(xmlString); | ||
392 | } | 392 | } |
393 | 393 | ||
394 | byte[] HandleAddFolder(Dictionary<string,object> request) | 394 | byte[] HandleAddFolder(Dictionary<string,object> request) |
@@ -550,9 +550,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
550 | result["item"] = EncodeItem(item); | 550 | result["item"] = EncodeItem(item); |
551 | 551 | ||
552 | string xmlString = ServerUtils.BuildXmlResponse(result); | 552 | string xmlString = ServerUtils.BuildXmlResponse(result); |
553 | |||
553 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 554 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
554 | UTF8Encoding encoding = new UTF8Encoding(); | 555 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
555 | return encoding.GetBytes(xmlString); | ||
556 | } | 556 | } |
557 | 557 | ||
558 | byte[] HandleGetFolder(Dictionary<string,object> request) | 558 | byte[] HandleGetFolder(Dictionary<string,object> request) |
@@ -567,9 +567,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
567 | result["folder"] = EncodeFolder(folder); | 567 | result["folder"] = EncodeFolder(folder); |
568 | 568 | ||
569 | string xmlString = ServerUtils.BuildXmlResponse(result); | 569 | string xmlString = ServerUtils.BuildXmlResponse(result); |
570 | |||
570 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 571 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
571 | UTF8Encoding encoding = new UTF8Encoding(); | 572 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
572 | return encoding.GetBytes(xmlString); | ||
573 | } | 573 | } |
574 | 574 | ||
575 | byte[] HandleGetActiveGestures(Dictionary<string,object> request) | 575 | byte[] HandleGetActiveGestures(Dictionary<string,object> request) |
@@ -592,9 +592,9 @@ namespace OpenSim.Server.Handlers.Asset | |||
592 | result["ITEMS"] = items; | 592 | result["ITEMS"] = items; |
593 | 593 | ||
594 | string xmlString = ServerUtils.BuildXmlResponse(result); | 594 | string xmlString = ServerUtils.BuildXmlResponse(result); |
595 | |||
595 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 596 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
596 | UTF8Encoding encoding = new UTF8Encoding(); | 597 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
597 | return encoding.GetBytes(xmlString); | ||
598 | } | 598 | } |
599 | 599 | ||
600 | byte[] HandleGetAssetPermissions(Dictionary<string,object> request) | 600 | byte[] HandleGetAssetPermissions(Dictionary<string,object> request) |
@@ -609,12 +609,11 @@ namespace OpenSim.Server.Handlers.Asset | |||
609 | 609 | ||
610 | result["RESULT"] = perms.ToString(); | 610 | result["RESULT"] = perms.ToString(); |
611 | string xmlString = ServerUtils.BuildXmlResponse(result); | 611 | string xmlString = ServerUtils.BuildXmlResponse(result); |
612 | |||
612 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 613 | //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
613 | UTF8Encoding encoding = new UTF8Encoding(); | 614 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
614 | return encoding.GetBytes(xmlString); | ||
615 | } | 615 | } |
616 | 616 | ||
617 | |||
618 | private Dictionary<string, object> EncodeFolder(InventoryFolderBase f) | 617 | private Dictionary<string, object> EncodeFolder(InventoryFolderBase f) |
619 | { | 618 | { |
620 | Dictionary<string, object> ret = new Dictionary<string, object>(); | 619 | Dictionary<string, object> ret = new Dictionary<string, object>(); |
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 6b6a552..2d67c6d 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -199,9 +199,9 @@ namespace OpenSim.Server.Handlers.Presence | |||
199 | result["result"] = pinfo.ToKeyValuePairs(); | 199 | result["result"] = pinfo.ToKeyValuePairs(); |
200 | 200 | ||
201 | string xmlString = ServerUtils.BuildXmlResponse(result); | 201 | string xmlString = ServerUtils.BuildXmlResponse(result); |
202 | |||
202 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 203 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
203 | UTF8Encoding encoding = new UTF8Encoding(); | 204 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
204 | return encoding.GetBytes(xmlString); | ||
205 | } | 205 | } |
206 | 206 | ||
207 | byte[] GetAgents(Dictionary<string, object> request) | 207 | byte[] GetAgents(Dictionary<string, object> request) |
@@ -240,12 +240,11 @@ namespace OpenSim.Server.Handlers.Presence | |||
240 | } | 240 | } |
241 | 241 | ||
242 | string xmlString = ServerUtils.BuildXmlResponse(result); | 242 | string xmlString = ServerUtils.BuildXmlResponse(result); |
243 | |||
243 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 244 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
244 | UTF8Encoding encoding = new UTF8Encoding(); | 245 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
245 | return encoding.GetBytes(xmlString); | ||
246 | } | 246 | } |
247 | 247 | ||
248 | |||
249 | private byte[] SuccessResult() | 248 | private byte[] SuccessResult() |
250 | { | 249 | { |
251 | XmlDocument doc = new XmlDocument(); | 250 | XmlDocument doc = new XmlDocument(); |
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs index 3fd69ae..72551ef 100644 --- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs +++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | |||
@@ -195,9 +195,9 @@ namespace OpenSim.Server.Handlers.UserAccounts | |||
195 | } | 195 | } |
196 | 196 | ||
197 | string xmlString = ServerUtils.BuildXmlResponse(result); | 197 | string xmlString = ServerUtils.BuildXmlResponse(result); |
198 | |||
198 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); | 199 | //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString); |
199 | UTF8Encoding encoding = new UTF8Encoding(); | 200 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
200 | return encoding.GetBytes(xmlString); | ||
201 | } | 201 | } |
202 | 202 | ||
203 | byte[] StoreAccount(Dictionary<string, object> request) | 203 | byte[] StoreAccount(Dictionary<string, object> request) |
@@ -353,8 +353,7 @@ namespace OpenSim.Server.Handlers.UserAccounts | |||
353 | private byte[] ResultToBytes(Dictionary<string, object> result) | 353 | private byte[] ResultToBytes(Dictionary<string, object> result) |
354 | { | 354 | { |
355 | string xmlString = ServerUtils.BuildXmlResponse(result); | 355 | string xmlString = ServerUtils.BuildXmlResponse(result); |
356 | UTF8Encoding encoding = new UTF8Encoding(); | 356 | return Util.UTF8NoBomEncoding.GetBytes(xmlString); |
357 | return encoding.GetBytes(xmlString); | ||
358 | } | 357 | } |
359 | } | 358 | } |
360 | } | 359 | } \ No newline at end of file |