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/Handlers/GridUser/GridUserServerPostHandler.cs | |
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/Handlers/GridUser/GridUserServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 13 |
1 files changed, 5 insertions, 8 deletions
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) |