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/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | 4 ++--
OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 4 ++--
OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 4 ++--
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index 1b53a42..637beef 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -54,8 +54,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
m_FriendsModule = fmodule;
}
- public override byte[] Handle(string path, Stream requestData,
- OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ public override byte[] Handle(
+ string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
StreamReader sr = new StreamReader(requestData);
string body = sr.ReadToEnd();
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 2117827..94bba83 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1421,7 +1421,7 @@ namespace OpenSim.Region.CoreModules.World.Land
caps.RegisterHandler("RemoteParcelRequest",
new RestStreamHandler("POST", capsBase + remoteParcelRequestPath,
delegate(string request, string path, string param,
- OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return RemoteParcelRequest(request, path, param, agentID, caps);
}));
@@ -1429,7 +1429,7 @@ namespace OpenSim.Region.CoreModules.World.Land
caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param,
- OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
}));
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index 898ca4a..5239f50 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -293,7 +293,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
///
///
protected string HandleObjectMediaMessage(
- string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
/// /param>
///
protected string HandleObjectMediaNavigateMessage(
- string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 95c727f..9b0e2ff 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
caps.RegisterHandler("MapLayer",
new RestStreamHandler("POST", capsBase + m_mapLayerPath,
delegate(string request, string path, string param,
- OSHttpRequest httpRequest, OSHttpResponse httpResponse)
+ IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
{
return MapLayerRequest(request, path, param,
agentID, caps);
--
cgit v1.1