minor: replace xmlprc 'no method found' magic number with constant from xmlrpc library

remotes/origin/0.6.7-post-fixes
Justin Clark-Casey (justincc) 2009-09-24 15:02:55 +01:00
parent 7870152d23
commit e67341f24c
1 changed files with 5 additions and 1 deletions

View File

@ -736,8 +736,11 @@ namespace OpenSim.Framework.Servers.HttpServer
else else
{ {
xmlRpcResponse = new XmlRpcResponse(); xmlRpcResponse = new XmlRpcResponse();
// Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName)); xmlRpcResponse.SetFault(
XmlRpcErrorCodes.SERVER_ERROR_METHOD,
String.Format("Requested method [{0}] not found", methodName));
} }
responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
@ -757,6 +760,7 @@ namespace OpenSim.Framework.Servers.HttpServer
response.SendChunked = false; response.SendChunked = false;
response.ContentLength64 = buf.Length; response.ContentLength64 = buf.Length;
response.ContentEncoding = Encoding.UTF8; response.ContentEncoding = Encoding.UTF8;
try try
{ {
response.OutputStream.Write(buf, 0, buf.Length); response.OutputStream.Write(buf, 0, buf.Length);