aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-13 01:03:28 +0100
committerJustin Clark-Casey (justincc)2012-07-13 01:03:28 +0100
commit884d603cac6c3fe0cdbd199e13e1514146ff82bc (patch)
tree00701964cd4053700c5f37c48c8a5196928b00d1 /OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
parentDon't cache regions data on the other unused LocalGridServiceConnector that t... (diff)
downloadopensim-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/Handlers/UserAccounts/UserAccountServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs9
1 files changed, 4 insertions, 5 deletions
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