mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
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).
This commit is contained in:
@@ -195,9 +195,9 @@ namespace OpenSim.Server.Handlers.UserAccounts
|
||||
}
|
||||
|
||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||
|
||||
//m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
|
||||
UTF8Encoding encoding = new UTF8Encoding();
|
||||
return encoding.GetBytes(xmlString);
|
||||
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
|
||||
}
|
||||
|
||||
byte[] StoreAccount(Dictionary<string, object> request)
|
||||
@@ -353,8 +353,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
|
||||
private byte[] ResultToBytes(Dictionary<string, object> result)
|
||||
{
|
||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||
UTF8Encoding encoding = new UTF8Encoding();
|
||||
return encoding.GetBytes(xmlString);
|
||||
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user