Fix mantis 6973. Prevent BOM being prefixed to message XML which was causing an exception when the service tried to read the data later on.

Signed-off-by: Oren Hurvitz <orenh@kitely.com>
bullet-2.82
AliciaRaven 2014-05-22 00:51:33 +01:00 committed by Oren Hurvitz
parent 251b93d97e
commit 04aa13a086
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ namespace OpenSim.OfflineIM
using (MemoryStream mstream = new MemoryStream()) using (MemoryStream mstream = new MemoryStream())
{ {
XmlWriterSettings settings = new XmlWriterSettings(); XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = Encoding.UTF8; settings.Encoding = Util.UTF8NoBomEncoding;
using (XmlWriter writer = XmlWriter.Create(mstream, settings)) using (XmlWriter writer = XmlWriter.Create(mstream, settings))
{ {
@ -112,7 +112,7 @@ namespace OpenSim.OfflineIM
writer.Flush(); writer.Flush();
} }
imXml = Util.UTF8.GetString(mstream.ToArray()); imXml = Util.UTF8NoBomEncoding.GetString(mstream.ToArray());
} }
OfflineIMData data = new OfflineIMData(); OfflineIMData data = new OfflineIMData();