aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-05 20:44:20 +0000
committerJustin Clark-Casey (justincc)2011-12-05 20:44:20 +0000
commit4567555c49cb560dd6f109bbfec42086af3de56f (patch)
treebfb0a6fd21d2070940399c0e36dc7d0de1e7eb0d /OpenSim/ApplicationPlugins/Rest/RestPlugin.cs
parentFor the GetTexture capability, if a data range is requested that covers the w... (diff)
downloadopensim-SC-4567555c49cb560dd6f109bbfec42086af3de56f.zip
opensim-SC-4567555c49cb560dd6f109bbfec42086af3de56f.tar.gz
opensim-SC-4567555c49cb560dd6f109bbfec42086af3de56f.tar.bz2
opensim-SC-4567555c49cb560dd6f109bbfec42086af3de56f.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs8
1 files changed, 4 insertions, 4 deletions
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
328 /// </summary> 328 /// </summary>
329 /// <param name="request">HTTP request header</param> 329 /// <param name="request">HTTP request header</param>
330 /// <returns>true when the HTTP request came from god.</returns> 330 /// <returns>true when the HTTP request came from god.</returns>
331 protected bool IsGod(OSHttpRequest request) 331 protected bool IsGod(IOSHttpRequest request)
332 { 332 {
333 string[] keys = request.Headers.GetValues("X-OpenSim-Godkey"); 333 string[] keys = request.Headers.GetValues("X-OpenSim-Godkey");
334 if (null == keys) return false; 334 if (null == keys) return false;
@@ -342,7 +342,7 @@ namespace OpenSim.ApplicationPlugins.Rest
342 /// HTTP header is indeed the password on file for the avatar 342 /// HTTP header is indeed the password on file for the avatar
343 /// specified by the UUID 343 /// specified by the UUID
344 /// </summary> 344 /// </summary>
345 protected bool IsVerifiedUser(OSHttpRequest request, UUID uuid) 345 protected bool IsVerifiedUser(IOSHttpRequest request, UUID uuid)
346 { 346 {
347 // XXX under construction 347 // XXX under construction
348 return false; 348 return false;
@@ -377,7 +377,7 @@ namespace OpenSim.ApplicationPlugins.Rest
377 /// <param name="message">failure message</param> 377 /// <param name="message">failure message</param>
378 /// <remarks>This should probably set a return code as 378 /// <remarks>This should probably set a return code as
379 /// well. (?)</remarks> 379 /// well. (?)</remarks>
380 protected string Failure(OSHttpResponse response, OSHttpStatusCode status, 380 protected string Failure(IOSHttpResponse response, OSHttpStatusCode status,
381 string method, string format, params string[] msg) 381 string method, string format, params string[] msg)
382 { 382 {
383 string m = String.Format(format, msg); 383 string m = String.Format(format, msg);
@@ -396,7 +396,7 @@ namespace OpenSim.ApplicationPlugins.Rest
396 /// <param name="e">exception causing the failure message</param> 396 /// <param name="e">exception causing the failure message</param>
397 /// <remarks>This should probably set a return code as 397 /// <remarks>This should probably set a return code as
398 /// well. (?)</remarks> 398 /// well. (?)</remarks>
399 public string Failure(OSHttpResponse response, OSHttpStatusCode status, 399 public string Failure(IOSHttpResponse response, OSHttpStatusCode status,
400 string method, Exception e) 400 string method, Exception e)
401 { 401 {
402 string m = String.Format("exception occurred: {0}", e.Message); 402 string m = String.Format("exception occurred: {0}", e.Message);