diff options
author | Justin Clarke Casey | 2008-02-18 18:48:55 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-18 18:48:55 +0000 |
commit | 359f84ee43d93b45610eb7fab308b8f1675a4d60 (patch) | |
tree | 2471562467aaac5acaf24a39c96f8fd621ec60f1 /OpenSim/Framework | |
parent | * Fixed a land manager exception or two with Math.Max(255,Math.Min(0,val)) (diff) | |
download | opensim-SC-359f84ee43d93b45610eb7fab308b8f1675a4d60.zip opensim-SC-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.gz opensim-SC-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.bz2 opensim-SC-359f84ee43d93b45610eb7fab308b8f1675a4d60.tar.xz |
* Output XmlRpc error message if user server gets a fault response from the region server on login
* This will make it more obvious if one accidentally starts one's region server in standalone rather than grid mode but then tries to login to a grid (as I am wont to do)
* We are now sending back a fault code (-32601) if no xmlrpc method is found rather than an ordinary message
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 15 |
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); |