From 4567555c49cb560dd6f109bbfec42086af3de56f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 5 Dec 2011 20:44:20 +0000 Subject: Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse. This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation. This is also required to write regression tests that involve the HTTP layer. If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse. --- OpenSim/ApplicationPlugins/Rest/RestPlugin.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/RestPlugin.cs') diff --git a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs index ff1502a..eb16750 100644 --- a/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs +++ b/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs @@ -328,7 +328,7 @@ namespace OpenSim.ApplicationPlugins.Rest /// /// HTTP request header /// true when the HTTP request came from god. - protected bool IsGod(OSHttpRequest request) + protected bool IsGod(IOSHttpRequest request) { string[] keys = request.Headers.GetValues("X-OpenSim-Godkey"); if (null == keys) return false; @@ -342,7 +342,7 @@ namespace OpenSim.ApplicationPlugins.Rest /// HTTP header is indeed the password on file for the avatar /// specified by the UUID /// - protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid) + protected bool IsVerifiedUser(IOSHttpRequest request, UUID uuid) { // XXX under construction return false; @@ -377,7 +377,7 @@ namespace OpenSim.ApplicationPlugins.Rest /// failure message /// This should probably set a return code as /// well. (?) - protected string Failure(OSHttpResponse response, OSHttpStatusCode status, + protected string Failure(IOSHttpResponse response, OSHttpStatusCode status, string method, string format, params string[] msg) { string m = String.Format(format, msg); @@ -396,7 +396,7 @@ namespace OpenSim.ApplicationPlugins.Rest /// exception causing the failure message /// This should probably set a return code as /// well. (?) - public string Failure(OSHttpResponse response, OSHttpStatusCode status, + public string Failure(IOSHttpResponse response, OSHttpStatusCode status, string method, Exception e) { string m = String.Format("exception occurred: {0}", e.Message); -- cgit v1.1