From b2772b3a2ded5149db6cd31dab745c2369d74075 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 25 Sep 2009 07:38:05 -0700 Subject: Added GridForm.html in Tests/Clients/Grid that shows how to interact with a grid server via regular Web forms. May be good for developing administrative tools. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 17 ++++++++++------- OpenSim/Tests/Clients/Grid/GridForm.html | 11 +++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 OpenSim/Tests/Clients/Grid/GridForm.html (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index f50e6a2..711639f 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -64,7 +64,9 @@ namespace OpenSim.Server.Handlers.Grid string body = sr.ReadToEnd(); sr.Close(); body = body.Trim(); - + + //m_log.DebugFormat("[XXX]: query String: {0}", body); + Dictionary request = ServerUtils.ParseQueryString(body); @@ -101,7 +103,7 @@ namespace OpenSim.Server.Handlers.Grid } - m_log.DebugFormat("[GRID HANDLER XXX]: unknown method {0} request {1}", method.Length, method); + m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method); return FailureResult(); } @@ -320,26 +322,27 @@ namespace OpenSim.Server.Handlers.Grid byte[] GetRegionRange(Dictionary request) { + //m_log.DebugFormat("[GRID HANDLER]: GetRegionRange"); UUID scopeID = UUID.Zero; - if (request["SCOPEID"] != null) + if (request.ContainsKey("SCOPEID")) UUID.TryParse(request["SCOPEID"], out scopeID); else m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region range"); int xmin = 0, xmax = 0, ymin = 0, ymax = 0; - if (request["XMIN"] != null) + if (request.ContainsKey("XMIN")) Int32.TryParse(request["XMIN"], out xmin); else m_log.WarnFormat("[GRID HANDLER]: no XMIN in request to get region range"); - if (request["XMAX"] != null) + if (request.ContainsKey("XMAX")) Int32.TryParse(request["XMAX"], out xmax); else m_log.WarnFormat("[GRID HANDLER]: no XMAX in request to get region range"); - if (request["YMIN"] != null) + if (request.ContainsKey("YMIN")) Int32.TryParse(request["YMIN"], out ymin); else m_log.WarnFormat("[GRID HANDLER]: no YMIN in request to get region range"); - if (request["YMAX"] != null) + if (request.ContainsKey("YMAX")) Int32.TryParse(request["YMAX"], out ymax); else m_log.WarnFormat("[GRID HANDLER]: no YMAX in request to get region range"); diff --git a/OpenSim/Tests/Clients/Grid/GridForm.html b/OpenSim/Tests/Clients/Grid/GridForm.html new file mode 100644 index 0000000..252920f --- /dev/null +++ b/OpenSim/Tests/Clients/Grid/GridForm.html @@ -0,0 +1,11 @@ + + +
+xmin: +xmax: +ymin: +ymax: + + +
+ -- cgit v1.1