XML should not contain any BOM. Disabled BOM generation in BaseHttpServer

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
inv-download
Freaky Tech 2015-03-02 20:42:57 +01:00 committed by BlueWall
parent b8157174ca
commit f68a1a2218
1 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ namespace OpenSim.Framework.Servers.HttpServer
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private HttpServerLogWriter httpserverlog = new HttpServerLogWriter();
private static Encoding UTF8NoBOM = new System.Text.UTF8Encoding(false);
/// <summary>
/// This is a pending websocket request before it got an sucessful upgrade response.
@ -1115,7 +1116,7 @@ namespace OpenSim.Framework.Servers.HttpServer
response.ContentType = "text/xml";
using (MemoryStream outs = new MemoryStream())
using (XmlTextWriter writer = new XmlTextWriter(outs, Encoding.UTF8))
using (XmlTextWriter writer = new XmlTextWriter(outs, UTF8NoBOM))
{
writer.Formatting = Formatting.None;
XmlRpcResponseSerializer.Singleton.Serialize(writer, xmlRpcResponse);