mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
#18974: Including xml declaration in XmlRpc results
Work Item: 18974 --HG-- branch : 1.x
This commit is contained in:
@@ -33,8 +33,11 @@ namespace Orchard.Core.XmlRpc.Controllers {
|
|||||||
if (methodResponse == null)
|
if (methodResponse == null)
|
||||||
throw new HttpException(500, "TODO: xmlrpc fault");
|
throw new HttpException(500, "TODO: xmlrpc fault");
|
||||||
|
|
||||||
var content = _writer.MapMethodResponse(methodResponse).ToString();
|
// using Save() to render the xml declaration
|
||||||
return Content(content, "text/xml");
|
var content = new StringBuilder();
|
||||||
|
_writer.MapMethodResponse(methodResponse).Save(new StringWriter(content));
|
||||||
|
|
||||||
|
return Content(content.ToString(), "text/xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
private XRpcMethodResponse Dispatch(XRpcMethodCall request) {
|
private XRpcMethodResponse Dispatch(XRpcMethodCall request) {
|
||||||
|
Reference in New Issue
Block a user