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/Framework/Communications/CAPSService.cs | 3 ++- OpenSim/Framework/Communications/Capabilities/Caps.cs | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/CAPSService.cs b/OpenSim/Framework/Communications/CAPSService.cs index caf96ff..07bea9d 100644 --- a/OpenSim/Framework/Communications/CAPSService.cs +++ b/OpenSim/Framework/Communications/CAPSService.cs @@ -45,7 +45,8 @@ namespace OpenSim.Framework.Communications m_server.AddStreamHandler(new RestStreamHandler("POST", path, restMethod)); } - public string CapsRequest(string request, string path, string param) + public string CapsRequest(string request, string path, string param, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) { System.Console.WriteLine("new caps request " + request + " from path " + path); return String.Empty; diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 9725c94..8d8f945 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -208,8 +208,11 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// + /// HTTP request header object + /// HTTP response header object /// - public string CapsRequest(string request, string path, string param) + public string CapsRequest(string request, string path, string param, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) { m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); //Console.WriteLine("caps request " + request); @@ -503,8 +506,11 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// + /// HTTP request header object + /// HTTP response header object /// - public string ScriptTaskInventory(string request, string path, string param) + public string ScriptTaskInventory(string request, string path, string param, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) { try { @@ -558,7 +564,8 @@ namespace OpenSim.Framework.Communications.Capabilities /// /// /// - public string NoteCardAgentInventory(string request, string path, string param) + public string NoteCardAgentInventory(string request, string path, string param, + OSHttpRequest httpRequest, OSHttpResponse httpResponse) { m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName); //libsecondlife.StructuredData.LLSDMap hash = (libsecondlife.StructuredData.LLSDMap)libsecondlife.StructuredData.LLSDParser.DeserializeBinary(Helpers.StringToField(request)); -- cgit v1.1