From a53cea6b7e4094ea51339c80ab5fe160a19a9f6b Mon Sep 17 00:00:00 2001
From: Dr Scofield
Date: Tue, 20 May 2008 16:51:45 +0000
Subject: i'm extending the RestStreamHandler.Handler(...) signature to
actually provide OSHttpRequest and OSHttpResponse to our REST handler.
also, this adds proper RestPlugin.IsGod() checking against the X-OpenSim-Godkey
HTTP request header.
last, i added XML doc comments to RestPlugin.cs
---
OpenSim/Grid/GridServer/GridManager.cs | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Grid/GridServer')
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index 83b5319..5a6a328 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -877,10 +877,13 @@ namespace OpenSim.Grid.GridServer
///
///
///
+ /// HTTP request header object
+ /// HTTP response header object
///
- public string RestGetRegionMethod(string request, string path, string param)
+ public string RestGetRegionMethod(string request, string path, string param,
+ OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
- return RestGetSimMethod(String.Empty, "/sims/", param);
+ return RestGetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
}
///
@@ -889,10 +892,13 @@ namespace OpenSim.Grid.GridServer
///
///
///
+ /// HTTP request header object
+ /// HTTP response header object
///
- public string RestSetRegionMethod(string request, string path, string param)
+ public string RestSetRegionMethod(string request, string path, string param,
+ OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
- return RestSetSimMethod(String.Empty, "/sims/", param);
+ return RestSetSimMethod(String.Empty, "/sims/", param, httpRequest, httpResponse);
}
///
@@ -901,8 +907,11 @@ namespace OpenSim.Grid.GridServer
///
///
/// A string representing the sim's UUID
+ /// HTTP request header object
+ /// HTTP response header object
/// Information about the sim in XML
- public string RestGetSimMethod(string request, string path, string param)
+ public string RestGetSimMethod(string request, string path, string param,
+ OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
string respstring = String.Empty;
@@ -946,8 +955,11 @@ namespace OpenSim.Grid.GridServer
///
///
///
+ /// HTTP request header object
+ /// HTTP response header object
/// "OK" or an error
- public string RestSetSimMethod(string request, string path, string param)
+ public string RestSetSimMethod(string request, string path, string param,
+ OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
Console.WriteLine("Processing region update via REST method");
RegionProfileData theSim;
--
cgit v1.1