aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2009-09-25 07:38:05 -0700
committerDiva Canto2009-09-25 07:38:05 -0700
commitb2772b3a2ded5149db6cd31dab745c2369d74075 (patch)
tree4bdcf1c2d11768f57559459eddad6657b9615e3a
parentBetter guards on RegisterRegion in GridService. (diff)
downloadopensim-SC-b2772b3a2ded5149db6cd31dab745c2369d74075.zip
opensim-SC-b2772b3a2ded5149db6cd31dab745c2369d74075.tar.gz
opensim-SC-b2772b3a2ded5149db6cd31dab745c2369d74075.tar.bz2
opensim-SC-b2772b3a2ded5149db6cd31dab745c2369d74075.tar.xz
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.
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs17
-rw-r--r--OpenSim/Tests/Clients/Grid/GridForm.html11
2 files changed, 21 insertions, 7 deletions
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
64 string body = sr.ReadToEnd(); 64 string body = sr.ReadToEnd();
65 sr.Close(); 65 sr.Close();
66 body = body.Trim(); 66 body = body.Trim();
67 67
68 //m_log.DebugFormat("[XXX]: query String: {0}", body);
69
68 Dictionary<string, string> request = 70 Dictionary<string, string> request =
69 ServerUtils.ParseQueryString(body); 71 ServerUtils.ParseQueryString(body);
70 72
@@ -101,7 +103,7 @@ namespace OpenSim.Server.Handlers.Grid
101 103
102 } 104 }
103 105
104 m_log.DebugFormat("[GRID HANDLER XXX]: unknown method {0} request {1}", method.Length, method); 106 m_log.DebugFormat("[GRID HANDLER]: unknown method {0} request {1}", method.Length, method);
105 return FailureResult(); 107 return FailureResult();
106 108
107 } 109 }
@@ -320,26 +322,27 @@ namespace OpenSim.Server.Handlers.Grid
320 322
321 byte[] GetRegionRange(Dictionary<string, string> request) 323 byte[] GetRegionRange(Dictionary<string, string> request)
322 { 324 {
325 //m_log.DebugFormat("[GRID HANDLER]: GetRegionRange");
323 UUID scopeID = UUID.Zero; 326 UUID scopeID = UUID.Zero;
324 if (request["SCOPEID"] != null) 327 if (request.ContainsKey("SCOPEID"))
325 UUID.TryParse(request["SCOPEID"], out scopeID); 328 UUID.TryParse(request["SCOPEID"], out scopeID);
326 else 329 else
327 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region range"); 330 m_log.WarnFormat("[GRID HANDLER]: no scopeID in request to get region range");
328 331
329 int xmin = 0, xmax = 0, ymin = 0, ymax = 0; 332 int xmin = 0, xmax = 0, ymin = 0, ymax = 0;
330 if (request["XMIN"] != null) 333 if (request.ContainsKey("XMIN"))
331 Int32.TryParse(request["XMIN"], out xmin); 334 Int32.TryParse(request["XMIN"], out xmin);
332 else 335 else
333 m_log.WarnFormat("[GRID HANDLER]: no XMIN in request to get region range"); 336 m_log.WarnFormat("[GRID HANDLER]: no XMIN in request to get region range");
334 if (request["XMAX"] != null) 337 if (request.ContainsKey("XMAX"))
335 Int32.TryParse(request["XMAX"], out xmax); 338 Int32.TryParse(request["XMAX"], out xmax);
336 else 339 else
337 m_log.WarnFormat("[GRID HANDLER]: no XMAX in request to get region range"); 340 m_log.WarnFormat("[GRID HANDLER]: no XMAX in request to get region range");
338 if (request["YMIN"] != null) 341 if (request.ContainsKey("YMIN"))
339 Int32.TryParse(request["YMIN"], out ymin); 342 Int32.TryParse(request["YMIN"], out ymin);
340 else 343 else
341 m_log.WarnFormat("[GRID HANDLER]: no YMIN in request to get region range"); 344 m_log.WarnFormat("[GRID HANDLER]: no YMIN in request to get region range");
342 if (request["YMAX"] != null) 345 if (request.ContainsKey("YMAX"))
343 Int32.TryParse(request["YMAX"], out ymax); 346 Int32.TryParse(request["YMAX"], out ymax);
344 else 347 else
345 m_log.WarnFormat("[GRID HANDLER]: no YMAX in request to get region range"); 348 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 @@
1<html>
2
3<form name="input" action="http://127.0.0.1:8002/grid" method="post">
4xmin:<input type="text" name="XMIN" value="0">
5xmax:<input type="text" name="XMAX" value="0">
6ymin:<input type="text" name="YMIN" value="0">
7ymax:<input type="text" name="YMAX" value="0">
8<input type="hidden" name="METHOD" value="get_region_range">
9<input type="submit" value="Submit" />
10</form>
11</html>