aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 6b576e6..7f9e1a1 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -230,6 +230,13 @@ namespace OpenSim.Framework.Servers
230 return true; 230 return true;
231 } 231 }
232 } 232 }
233
234 /// <summary>
235 /// Try all the registered xmlrpc handlers when an xmlrpc request is received.
236 /// Sends back an XMLRPC unknown request response if no handler is registered for the requested method.
237 /// </summary>
238 /// <param name="request"></param>
239 /// <param name="response"></param>
233 private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response) 240 private void HandleXmlRpcRequests(HttpListenerRequest request, HttpListenerResponse response)
234 { 241 {
235 Stream requestStream = request.InputStream; 242 Stream requestStream = request.InputStream;
@@ -268,12 +275,8 @@ namespace OpenSim.Framework.Servers
268 else 275 else
269 { 276 {
270 xmlRpcResponse = new XmlRpcResponse(); 277 xmlRpcResponse = new XmlRpcResponse();
271 Hashtable unknownMethodError = new Hashtable(); 278 // Code set in accordance with http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
272 unknownMethodError["reason"] = "XmlRequest"; 279 xmlRpcResponse.SetFault(-32601, String.Format("Requested method [{0}] not found", methodName));
273 ;
274 unknownMethodError["message"] = "Unknown Rpc Request [" + methodName + "]";
275 unknownMethodError["login"] = "false";
276 xmlRpcResponse.Value = unknownMethodError;
277 } 280 }
278 281
279 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); 282 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);