aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-12-05 20:32:35 +0000
committerMelanie2011-12-05 20:32:35 +0000
commitbc17e2e9cf1361116f9082326f7630b8f0c862ba (patch)
treed0bc568f8b5eeb47ccd77c822e6941b0e150319c /OpenSim
parentAdd the proper result code as per the LL announcement for llTransferLindenDol... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-bc17e2e9cf1361116f9082326f7630b8f0c862ba.zip
opensim-SC_OLD-bc17e2e9cf1361116f9082326f7630b8f0c862ba.tar.gz
opensim-SC_OLD-bc17e2e9cf1361116f9082326f7630b8f0c862ba.tar.bz2
opensim-SC_OLD-bc17e2e9cf1361116f9082326f7630b8f0c862ba.tar.xz
Merge branch 'master' into bigmerge
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs12
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs4
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs6
-rw-r--r--OpenSim/ApplicationPlugins/Rest/RestPlugin.cs8
-rw-r--r--OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs6
-rw-r--r--OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs2
-rw-r--r--OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs2
-rw-r--r--OpenSim/Capabilities/LLSDStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpRequest.cs59
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs138
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs5
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestMethod.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestSessionService.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestStreamHandler.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs2
-rw-r--r--OpenSim/Region/DataSnapshot/DataRequestHandler.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs2
-rw-r--r--OpenSim/Region/UserStatistics/WebStatsModule.cs2
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Base/Utils.cs2
-rw-r--r--OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs2
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs8
-rw-r--r--OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Map/MapAddServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Map/MapGetServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs8
-rw-r--r--OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs2
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs4
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs112
55 files changed, 380 insertions, 103 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index dea166d..d99ba57 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -41,7 +41,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
41 { 41 {
42 #region GET methods 42 #region GET methods
43 public string GetHandler(string request, string path, string param, 43 public string GetHandler(string request, string path, string param,
44 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 44 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
45 { 45 {
46 // foreach (string h in httpRequest.Headers.AllKeys) 46 // foreach (string h in httpRequest.Headers.AllKeys)
47 // foreach (string v in httpRequest.Headers.GetValues(h)) 47 // foreach (string v in httpRequest.Headers.GetValues(h))
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
64 } 64 }
65 } 65 }
66 66
67 public string GetHandlerRegions(OSHttpResponse httpResponse) 67 public string GetHandlerRegions(IOSHttpResponse httpResponse)
68 { 68 {
69 RestXmlWriter rxw = new RestXmlWriter(new StringWriter()); 69 RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
70 70
@@ -95,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
95 return rxw.ToString(); 95 return rxw.ToString();
96 } 96 }
97 97
98 public string GetHandlerRegion(OSHttpResponse httpResponse, string param) 98 public string GetHandlerRegion(IOSHttpResponse httpResponse, string param)
99 { 99 {
100 // be resilient and don't get confused by a terminating '/' 100 // be resilient and don't get confused by a terminating '/'
101 param = param.TrimEnd(new char[]{'/'}); 101 param = param.TrimEnd(new char[]{'/'});
@@ -180,7 +180,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
180 } 180 }
181 #endregion GET methods 181 #endregion GET methods
182 182
183 protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene) 183 protected string RegionTerrain(IOSHttpResponse httpResponse, Scene scene)
184 { 184 {
185 httpResponse.SendChunked = true; 185 httpResponse.SendChunked = true;
186 httpResponse.ContentType = "text/xml"; 186 httpResponse.ContentType = "text/xml";
@@ -190,7 +190,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
190 // "GET", "terrain not implemented"); 190 // "GET", "terrain not implemented");
191 } 191 }
192 192
193 protected string RegionStats(OSHttpResponse httpResponse, Scene scene) 193 protected string RegionStats(IOSHttpResponse httpResponse, Scene scene)
194 { 194 {
195 int users = scene.GetRootAgentCount(); 195 int users = scene.GetRootAgentCount();
196 int objects = scene.Entities.Count - users; 196 int objects = scene.Entities.Count - users;
@@ -213,7 +213,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
213 return rxw.ToString(); 213 return rxw.ToString();
214 } 214 }
215 215
216 protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max) 216 protected string RegionPrims(IOSHttpResponse httpResponse, Scene scene, Vector3 min, Vector3 max)
217 { 217 {
218 httpResponse.SendChunked = true; 218 httpResponse.SendChunked = true;
219 httpResponse.ContentType = "text/xml"; 219 httpResponse.ContentType = "text/xml";
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs
index 279db4c..468faea 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETRegionInfoHandler.cs
@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
40 { 40 {
41 #region GET methods 41 #region GET methods
42 public string GetRegionInfoHandler(string request, string path, string param, 42 public string GetRegionInfoHandler(string request, string path, string param,
43 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 43 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
44 { 44 {
45 // foreach (string h in httpRequest.Headers.AllKeys) 45 // foreach (string h in httpRequest.Headers.AllKeys)
46 // foreach (string v in httpRequest.Headers.GetValues(h)) 46 // foreach (string v in httpRequest.Headers.GetValues(h))
@@ -64,7 +64,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
64 } 64 }
65 } 65 }
66 66
67 public string GetRegionInfoHandlerRegions(OSHttpResponse httpResponse) 67 public string GetRegionInfoHandlerRegions(IOSHttpResponse httpResponse)
68 { 68 {
69 RestXmlWriter rxw = new RestXmlWriter(new StringWriter()); 69 RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
70 70
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
index e0318e5..f666f45 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/POSTHandler.cs
@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
40 #region POST methods 40 #region POST methods
41 41
42 public string PostHandler(string request, string path, string param, 42 public string PostHandler(string request, string path, string param,
43 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 43 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
44 { 44 {
45 // foreach (string h in httpRequest.Headers.AllKeys) 45 // foreach (string h in httpRequest.Headers.AllKeys)
46 // foreach (string v in httpRequest.Headers.GetValues(h)) 46 // foreach (string v in httpRequest.Headers.GetValues(h))
@@ -92,7 +92,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
92 } 92 }
93 } 93 }
94 94
95 public string CreateRegion(OSHttpRequest request, OSHttpResponse response) 95 public string CreateRegion(IOSHttpRequest request, IOSHttpResponse response)
96 { 96 {
97 RestXmlWriter rxw = new RestXmlWriter(new StringWriter()); 97 RestXmlWriter rxw = new RestXmlWriter(new StringWriter());
98 98
@@ -108,7 +108,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
108 return rxw.ToString(); 108 return rxw.ToString();
109 } 109 }
110 110
111 public string LoadPrims(string requestBody, OSHttpRequest request, OSHttpResponse response, Scene scene) 111 public string LoadPrims(string requestBody, IOSHttpRequest request, IOSHttpResponse response, Scene scene)
112 { 112 {
113 IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>(); 113 IRegionSerialiserModule serialiser = scene.RequestModuleInterface<IRegionSerialiserModule>();
114 if (serialiser != null) 114 if (serialiser != null)
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);
diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
index 7ab30ce..ae95821 100644
--- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Capabilities.Handlers
64 m_assetService = assService; 64 m_assetService = assService;
65 } 65 }
66 66
67 public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 67 public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
68 { 68 {
69 // Try to parse the texture ID from the request URL 69 // Try to parse the texture ID from the request URL
70 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); 70 NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query);
@@ -127,7 +127,7 @@ namespace OpenSim.Capabilities.Handlers
127 /// <param name="textureID"></param> 127 /// <param name="textureID"></param>
128 /// <param name="format"></param> 128 /// <param name="format"></param>
129 /// <returns>False for "caller try another codec"; true otherwise</returns> 129 /// <returns>False for "caller try another codec"; true otherwise</returns>
130 private bool FetchTexture(OSHttpRequest httpRequest, OSHttpResponse httpResponse, UUID textureID, string format) 130 private bool FetchTexture(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse, UUID textureID, string format)
131 { 131 {
132// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); 132// m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format);
133 AssetBase texture; 133 AssetBase texture;
@@ -211,7 +211,7 @@ namespace OpenSim.Capabilities.Handlers
211 return true; 211 return true;
212 } 212 }
213 213
214 private void WriteTextureData(OSHttpRequest request, OSHttpResponse response, AssetBase texture, string format) 214 private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format)
215 { 215 {
216 string range = request.Headers.GetOne("Range"); 216 string range = request.Headers.GetOne("Range");
217 217
diff --git a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
index b89fd6a..e0ccc3c 100644
--- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
+++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Capabilities.Handlers
73 /// <param name="httpResponse"></param> 73 /// <param name="httpResponse"></param>
74 /// <returns>The upload response if the request is successful, null otherwise.</returns> 74 /// <returns>The upload response if the request is successful, null otherwise.</returns>
75 public string UploadBakedTexture( 75 public string UploadBakedTexture(
76 string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 76 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
77 { 77 {
78 try 78 try
79 { 79 {
diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
index 2dade5b..a086c0e 100644
--- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
+++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Capabilities.Handlers
57 m_LibraryService = libService; 57 m_LibraryService = libService;
58 } 58 }
59 59
60 public string FetchInventoryDescendentsRequest(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62// lock (m_fetchLock) 62// lock (m_fetchLock)
63// { 63// {
diff --git a/OpenSim/Capabilities/LLSDStreamHandler.cs b/OpenSim/Capabilities/LLSDStreamHandler.cs
index 7aaa994..c7c1fc9 100644
--- a/OpenSim/Capabilities/LLSDStreamHandler.cs
+++ b/OpenSim/Capabilities/LLSDStreamHandler.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Capabilities
45 } 45 }
46 46
47 public override byte[] Handle(string path, Stream request, 47 public override byte[] Handle(string path, Stream request,
48 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 48 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
49 { 49 {
50 //Encoding encoding = Util.UTF8; 50 //Encoding encoding = Util.UTF8;
51 //StreamReader streamReader = new StreamReader(request, false); 51 //StreamReader streamReader = new StreamReader(request, false);
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index 3551d5d..817aa44 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -600,7 +600,7 @@ namespace OpenSim.Framework.Servers
600 600
601 } 601 }
602 602
603 public string StatReport(OSHttpRequest httpRequest) 603 public string StatReport(IOSHttpRequest httpRequest)
604 { 604 {
605 // If we catch a request for "callback", wrap the response in the value for jsonp 605 // If we catch a request for "callback", wrap the response in the value for jsonp
606 if (httpRequest.Query.ContainsKey("callback")) 606 if (httpRequest.Query.ContainsKey("callback"))
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
index 04943d1..f1cde74 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Framework.Servers.HttpServer
32 public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler 32 public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
33 { 33 {
34 public abstract byte[] Handle(string path, Stream request, 34 public abstract byte[] Handle(string path, Stream request,
35 OSHttpRequest httpRequest, OSHttpResponse httpResponse); 35 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
36 36
37 protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path) 37 protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)
38 { 38 {
diff --git a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs
index bae4e1b..1699233 100644
--- a/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BinaryStreamHandler.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
36 { 36 {
37 private BinaryMethod m_method; 37 private BinaryMethod m_method;
38 38
39 public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 39 public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
40 { 40 {
41 byte[] data = ReadFully(request); 41 byte[] data = ReadFully(request);
42 string param = GetParam(path); 42 string param = GetParam(path);
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpRequest.cs
new file mode 100644
index 0000000..caf0edd
--- /dev/null
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpRequest.cs
@@ -0,0 +1,59 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections;
30using System.Collections.Specialized;
31using System.IO;
32using System.Net;
33using System.Text;
34using System.Web;
35
36namespace OpenSim.Framework.Servers.HttpServer
37{
38 public interface IOSHttpRequest
39 {
40 string[] AcceptTypes { get; }
41 Encoding ContentEncoding { get; }
42 long ContentLength { get; }
43 long ContentLength64 { get; }
44 string ContentType { get; }
45 HttpCookieCollection Cookies { get; }
46 bool HasEntityBody { get; }
47 NameValueCollection Headers { get; }
48 string HttpMethod { get; }
49 Stream InputStream { get; }
50 bool IsSecured { get; }
51 bool KeepAlive { get; }
52 NameValueCollection QueryString { get; }
53 Hashtable Query { get; }
54 string RawUrl { get; }
55 IPEndPoint RemoteIPEndPoint { get; }
56 Uri Url { get; }
57 string UserAgent { get; }
58 }
59} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs
new file mode 100644
index 0000000..33a1663
--- /dev/null
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IOSHttpResponse.cs
@@ -0,0 +1,138 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections;
30using System.Collections.Specialized;
31using System.IO;
32using System.Net;
33using System.Text;
34using System.Web;
35
36namespace OpenSim.Framework.Servers.HttpServer
37{
38 public interface IOSHttpResponse
39 {
40 /// <summary>
41 /// Content type property.
42 /// </summary>
43 /// <remarks>
44 /// Setting this property will also set IsContentTypeSet to
45 /// true.
46 /// </remarks>
47 string ContentType { get; set; }
48
49 /// <summary>
50 /// Boolean property indicating whether the content type
51 /// property actively has been set.
52 /// </summary>
53 /// <remarks>
54 /// IsContentTypeSet will go away together with .NET base.
55 /// </remarks>
56 // public bool IsContentTypeSet
57 // {
58 // get { return _contentTypeSet; }
59 // }
60 // private bool _contentTypeSet;
61
62 /// <summary>
63 /// Length of the body content; 0 if there is no body.
64 /// </summary>
65 long ContentLength { get; set; }
66
67 /// <summary>
68 /// Alias for ContentLength.
69 /// </summary>
70 long ContentLength64 { get; set; }
71
72 /// <summary>
73 /// Encoding of the body content.
74 /// </summary>
75 Encoding ContentEncoding { get; set; }
76
77 bool KeepAlive { get; set; }
78
79 /// <summary>
80 /// Get or set the keep alive timeout property (default is
81 /// 20). Setting this to 0 also disables KeepAlive. Setting
82 /// this to something else but 0 also enable KeepAlive.
83 /// </summary>
84 int KeepAliveTimeout { get; set; }
85
86 /// <summary>
87 /// Return the output stream feeding the body.
88 /// </summary>
89 /// <remarks>
90 /// On its way out...
91 /// </remarks>
92 Stream OutputStream { get; }
93
94 string ProtocolVersion { get; set; }
95
96 /// <summary>
97 /// Return the output stream feeding the body.
98 /// </summary>
99 Stream Body { get; }
100
101 /// <summary>
102 /// Set a redirct location.
103 /// </summary>
104 string RedirectLocation { set; }
105
106 /// <summary>
107 /// Chunk transfers.
108 /// </summary>
109 bool SendChunked { get; set; }
110
111 /// <summary>
112 /// HTTP status code.
113 /// </summary>
114 int StatusCode { get; set; }
115
116 /// <summary>
117 /// HTTP status description.
118 /// </summary>
119 string StatusDescription { get; set; }
120
121 bool ReuseContext { get; set; }
122
123 /// <summary>
124 /// Add a header field and content to the response.
125 /// </summary>
126 /// <param name="key">string containing the header field
127 /// name</param>
128 /// <param name="value">string containing the header field
129 /// value</param>
130 void AddHeader(string key, string value);
131
132 /// <summary>
133 /// Send the response back to the remote client
134 /// </summary>
135 void Send();
136 }
137}
138
diff --git a/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
index 2e1bc0b..a449c2d 100644
--- a/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Interfaces/IStreamHandler.cs
@@ -45,13 +45,13 @@ namespace OpenSim.Framework.Servers.HttpServer
45 public interface IStreamedRequestHandler : IRequestHandler 45 public interface IStreamedRequestHandler : IRequestHandler
46 { 46 {
47 // Handle request stream, return byte array 47 // Handle request stream, return byte array
48 byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse); 48 byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
49 } 49 }
50 50
51 public interface IStreamHandler : IRequestHandler 51 public interface IStreamHandler : IRequestHandler
52 { 52 {
53 // Handle request stream, return byte array 53 // Handle request stream, return byte array
54 void Handle(string path, Stream request, Stream response, OSHttpRequest httpReqbuest, OSHttpResponse httpResponse); 54 void Handle(string path, Stream request, Stream response, IOSHttpRequest httpReqbuest, IOSHttpResponse httpResponse);
55 } 55 }
56 56
57 public interface IGenericHTTPHandler : IRequestHandler 57 public interface IGenericHTTPHandler : IRequestHandler
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index e354dfb..fc8daf3 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -39,7 +39,7 @@ using log4net;
39 39
40namespace OpenSim.Framework.Servers.HttpServer 40namespace OpenSim.Framework.Servers.HttpServer
41{ 41{
42 public class OSHttpRequest 42 public class OSHttpRequest : IOSHttpRequest
43 { 43 {
44 private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
@@ -174,7 +174,6 @@ namespace OpenSim.Framework.Servers.HttpServer
174 } 174 }
175 private Dictionary<string, object> _whiteboard = new Dictionary<string, object>(); 175 private Dictionary<string, object> _whiteboard = new Dictionary<string, object>();
176 176
177
178 public OSHttpRequest() {} 177 public OSHttpRequest() {}
179 178
180 public OSHttpRequest(IHttpClientContext context, IHttpRequest req) 179 public OSHttpRequest(IHttpClientContext context, IHttpRequest req)
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
index 7029289..f9227ac 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Framework.Servers.HttpServer
36 /// OSHttpResponse is the OpenSim representation of an HTTP 36 /// OSHttpResponse is the OpenSim representation of an HTTP
37 /// response. 37 /// response.
38 /// </summary> 38 /// </summary>
39 public class OSHttpResponse 39 public class OSHttpResponse : IOSHttpResponse
40 { 40 {
41 /// <summary> 41 /// <summary>
42 /// Content type property. 42 /// Content type property.
@@ -275,7 +275,6 @@ namespace OpenSim.Framework.Servers.HttpServer
275 } 275 }
276 } 276 }
277 277
278
279 protected IHttpResponse _httpResponse; 278 protected IHttpResponse _httpResponse;
280 private IHttpClientContext _httpClientContext; 279 private IHttpClientContext _httpClientContext;
281 280
@@ -331,4 +330,4 @@ namespace OpenSim.Framework.Servers.HttpServer
331 } 330 }
332 331
333 } 332 }
334} 333} \ No newline at end of file
diff --git a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs
index 3f2b265..a467a83 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestDeserialiseHandler.cs
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Servers.HttpServer
45 } 45 }
46 46
47 public void Handle(string path, Stream request, Stream responseStream, 47 public void Handle(string path, Stream request, Stream responseStream,
48 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 48 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
49 { 49 {
50 TRequest deserial; 50 TRequest deserial;
51 using (XmlTextReader xmlReader = new XmlTextReader(request)) 51 using (XmlTextReader xmlReader = new XmlTextReader(request))
diff --git a/OpenSim/Framework/Servers/HttpServer/RestMethod.cs b/OpenSim/Framework/Servers/HttpServer/RestMethod.cs
index f97efbe..80bc7ef 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestMethod.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestMethod.cs
@@ -28,5 +28,5 @@
28namespace OpenSim.Framework.Servers.HttpServer 28namespace OpenSim.Framework.Servers.HttpServer
29{ 29{
30 public delegate string RestMethod(string request, string path, string param, 30 public delegate string RestMethod(string request, string path, string param,
31 OSHttpRequest httpRequest, OSHttpResponse httpResponse); 31 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
32} 32}
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index 7ebb462..19c03a8 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -211,7 +211,7 @@ namespace OpenSim.Framework.Servers.HttpServer
211 } 211 }
212 212
213 public void Handle(string path, Stream request, Stream responseStream, 213 public void Handle(string path, Stream request, Stream responseStream,
214 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 214 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
215 { 215 {
216 RestSessionObject<TRequest> deserial = default(RestSessionObject<TRequest>); 216 RestSessionObject<TRequest> deserial = default(RestSessionObject<TRequest>);
217 bool fail = false; 217 bool fail = false;
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Servers.HttpServer
270 } 270 }
271 271
272 public void Handle(string path, Stream request, Stream responseStream, 272 public void Handle(string path, Stream request, Stream responseStream,
273 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 273 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
274 { 274 {
275 TRequest deserial = default(TRequest); 275 TRequest deserial = default(TRequest);
276 bool fail = false; 276 bool fail = false;
diff --git a/OpenSim/Framework/Servers/HttpServer/RestStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/RestStreamHandler.cs
index 2d43cd4..d2c4002 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestStreamHandler.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Framework.Servers.HttpServer
39 get { return m_restMethod; } 39 get { return m_restMethod; }
40 } 40 }
41 41
42 public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 42 public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
43 { 43 {
44 Encoding encoding = Encoding.UTF8; 44 Encoding encoding = Encoding.UTF8;
45 StreamReader streamReader = new StreamReader(request, encoding); 45 StreamReader streamReader = new StreamReader(request, encoding);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 8e1eb95..e8e4f19 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -801,7 +801,7 @@ namespace OpenSim
801 public class SimStatusHandler : IStreamedRequestHandler 801 public class SimStatusHandler : IStreamedRequestHandler
802 { 802 {
803 public byte[] Handle(string path, Stream request, 803 public byte[] Handle(string path, Stream request,
804 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 804 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
805 { 805 {
806 return Util.UTF8.GetBytes("OK"); 806 return Util.UTF8.GetBytes("OK");
807 } 807 }
@@ -838,7 +838,7 @@ namespace OpenSim
838 } 838 }
839 839
840 public byte[] Handle(string path, Stream request, 840 public byte[] Handle(string path, Stream request,
841 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 841 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
842 { 842 {
843 return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); 843 return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
844 } 844 }
@@ -879,7 +879,7 @@ namespace OpenSim
879 } 879 }
880 880
881 public byte[] Handle(string path, Stream request, 881 public byte[] Handle(string path, Stream request,
882 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 882 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
883 { 883 {
884 return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest)); 884 return Util.UTF8.GetBytes(m_opensim.StatReport(httpRequest));
885 } 885 }
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index 98dda36..2347cf2 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -223,7 +223,7 @@ namespace OpenSim.Region.ClientStack.Linden
223 /// <param name="httpResponse">HTTP response header object</param> 223 /// <param name="httpResponse">HTTP response header object</param>
224 /// <returns></returns> 224 /// <returns></returns>
225 public string SeedCapRequest(string request, string path, string param, 225 public string SeedCapRequest(string request, string path, string param,
226 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 226 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
227 { 227 {
228// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName); 228// m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
229 229
@@ -256,7 +256,7 @@ namespace OpenSim.Region.ClientStack.Linden
256 /// <param name="httpResponse">HTTP response header object</param> 256 /// <param name="httpResponse">HTTP response header object</param>
257 /// <returns></returns> 257 /// <returns></returns>
258 public string ScriptTaskInventory(string request, string path, string param, 258 public string ScriptTaskInventory(string request, string path, string param,
259 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 259 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
260 { 260 {
261 try 261 try
262 { 262 {
@@ -685,7 +685,7 @@ namespace OpenSim.Region.ClientStack.Linden
685 /// <param name="param"></param> 685 /// <param name="param"></param>
686 /// <returns></returns> 686 /// <returns></returns>
687 public string NoteCardAgentInventory(string request, string path, string param, 687 public string NoteCardAgentInventory(string request, string path, string param,
688 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 688 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
689 { 689 {
690 //m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName + "\n" + request); 690 //m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName + "\n" + request);
691 //m_log.Debug("[CAPS]: NoteCardAgentInventory Request is: " + request); 691 //m_log.Debug("[CAPS]: NoteCardAgentInventory Request is: " + request);
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
54 m_FriendsModule = fmodule; 54 m_FriendsModule = fmodule;
55 } 55 }
56 56
57 public override byte[] Handle(string path, Stream requestData, 57 public override byte[] Handle(
58 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 58 string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 StreamReader sr = new StreamReader(requestData); 60 StreamReader sr = new StreamReader(requestData);
61 string body = sr.ReadToEnd(); 61 string body = sr.ReadToEnd();
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 474905a..7a236bc 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -1393,7 +1393,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1393 caps.RegisterHandler("RemoteParcelRequest", 1393 caps.RegisterHandler("RemoteParcelRequest",
1394 new RestStreamHandler("POST", capsBase + remoteParcelRequestPath, 1394 new RestStreamHandler("POST", capsBase + remoteParcelRequestPath,
1395 delegate(string request, string path, string param, 1395 delegate(string request, string path, string param,
1396 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 1396 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
1397 { 1397 {
1398 return RemoteParcelRequest(request, path, param, agentID, caps); 1398 return RemoteParcelRequest(request, path, param, agentID, caps);
1399 })); 1399 }));
@@ -1401,7 +1401,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1401 caps.RegisterHandler("ParcelPropertiesUpdate", 1401 caps.RegisterHandler("ParcelPropertiesUpdate",
1402 new RestStreamHandler("POST", "/CAPS/" + parcelCapID, 1402 new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
1403 delegate(string request, string path, string param, 1403 delegate(string request, string path, string param,
1404 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 1404 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
1405 { 1405 {
1406 return ProcessPropertiesUpdate(request, path, param, agentID, caps); 1406 return ProcessPropertiesUpdate(request, path, param, agentID, caps);
1407 })); 1407 }));
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
293 /// <param name="httpResponse"></param> 293 /// <param name="httpResponse"></param>
294 /// <returns></returns> 294 /// <returns></returns>
295 protected string HandleObjectMediaMessage( 295 protected string HandleObjectMediaMessage(
296 string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 296 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
297 { 297 {
298// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); 298// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
299 299
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.World.Media.Moap
474 /// <param name="httpResponse">/param> 474 /// <param name="httpResponse">/param>
475 /// <returns></returns> 475 /// <returns></returns>
476 protected string HandleObjectMediaNavigateMessage( 476 protected string HandleObjectMediaNavigateMessage(
477 string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 477 string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
478 { 478 {
479// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); 479// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
480 480
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index ba4ddc1..7118f16 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
193 caps.RegisterHandler("MapLayer", 193 caps.RegisterHandler("MapLayer",
194 new RestStreamHandler("POST", capsBase + m_mapLayerPath, 194 new RestStreamHandler("POST", capsBase + m_mapLayerPath,
195 delegate(string request, string path, string param, 195 delegate(string request, string path, string param,
196 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 196 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
197 { 197 {
198 return MapLayerRequest(request, path, param, 198 return MapLayerRequest(request, path, param,
199 agentID, caps); 199 agentID, caps);
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index a505999..b760454 100644
--- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
@@ -74,7 +74,7 @@ namespace OpenSim.Region.DataSnapshot
74 } 74 }
75 75
76 public string OnDiscoveryAttempt(string request, string path, string param, 76 public string OnDiscoveryAttempt(string request, string path, string param,
77 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 77 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
78 { 78 {
79 //Very static for now, flexible enough to add new formats 79 //Very static for now, flexible enough to add new formats
80 LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse(); 80 LLSDDiscoveryResponse llsd_response = new LLSDDiscoveryResponse();
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
index 4578236..6c5685c 100644
--- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
+++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Scenes
64 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret); 64 osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
65 } 65 }
66 66
67 public byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 67 public byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
68 { 68 {
69 return Util.UTF8.GetBytes(Report()); 69 return Util.UTF8.GetBytes(Report());
70 } 70 }
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index 4f86e42..1b675a6 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
309 caps.RegisterHandler("ProvisionVoiceAccountRequest", 309 caps.RegisterHandler("ProvisionVoiceAccountRequest",
310 new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, 310 new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
311 delegate(string request, string path, string param, 311 delegate(string request, string path, string param,
312 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 312 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
313 { 313 {
314 return ProvisionVoiceAccountRequest(scene, request, path, param, 314 return ProvisionVoiceAccountRequest(scene, request, path, param,
315 agentID, caps); 315 agentID, caps);
@@ -317,7 +317,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
317 caps.RegisterHandler("ParcelVoiceInfoRequest", 317 caps.RegisterHandler("ParcelVoiceInfoRequest",
318 new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, 318 new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
319 delegate(string request, string path, string param, 319 delegate(string request, string path, string param,
320 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 320 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
321 { 321 {
322 return ParcelVoiceInfoRequest(scene, request, path, param, 322 return ParcelVoiceInfoRequest(scene, request, path, param,
323 agentID, caps); 323 agentID, caps);
@@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
325 caps.RegisterHandler("ChatSessionRequest", 325 caps.RegisterHandler("ChatSessionRequest",
326 new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, 326 new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath,
327 delegate(string request, string path, string param, 327 delegate(string request, string path, string param,
328 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 328 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
329 { 329 {
330 return ChatSessionRequest(scene, request, path, param, 330 return ChatSessionRequest(scene, request, path, param,
331 agentID, caps); 331 agentID, caps);
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
index ae902eb..0be0a19 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs
@@ -421,7 +421,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
421 caps.RegisterHandler("ProvisionVoiceAccountRequest", 421 caps.RegisterHandler("ProvisionVoiceAccountRequest",
422 new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath, 422 new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
423 delegate(string request, string path, string param, 423 delegate(string request, string path, string param,
424 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 424 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
425 { 425 {
426 return ProvisionVoiceAccountRequest(scene, request, path, param, 426 return ProvisionVoiceAccountRequest(scene, request, path, param,
427 agentID, caps); 427 agentID, caps);
@@ -429,7 +429,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
429 caps.RegisterHandler("ParcelVoiceInfoRequest", 429 caps.RegisterHandler("ParcelVoiceInfoRequest",
430 new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath, 430 new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
431 delegate(string request, string path, string param, 431 delegate(string request, string path, string param,
432 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 432 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
433 { 433 {
434 return ParcelVoiceInfoRequest(scene, request, path, param, 434 return ParcelVoiceInfoRequest(scene, request, path, param,
435 agentID, caps); 435 agentID, caps);
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
437 caps.RegisterHandler("ChatSessionRequest", 437 caps.RegisterHandler("ChatSessionRequest",
438 new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath, 438 new RestStreamHandler("POST", capsBase + m_chatSessionRequestPath,
439 delegate(string request, string path, string param, 439 delegate(string request, string path, string param,
440 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 440 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
441 { 441 {
442 return ChatSessionRequest(scene, request, path, param, 442 return ChatSessionRequest(scene, request, path, param,
443 agentID, caps); 443 agentID, caps);
diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs
index f47d9c7..550b5d4 100644
--- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs
+++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
56 } 56 }
57 57
58 public override byte[] Handle(string path, Stream requestData, 58 public override byte[] Handle(string path, Stream requestData,
59 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 59 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
60 { 60 {
61 httpResponse.ContentType = "image/jpeg"; 61 httpResponse.ContentType = "image/jpeg";
62 62
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index 0251ee8..fca9fd0 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -306,7 +306,7 @@ namespace OpenSim.Region.UserStatistics
306 caps.RegisterHandler("ViewerStats", 306 caps.RegisterHandler("ViewerStats",
307 new RestStreamHandler("POST", capsPath, 307 new RestStreamHandler("POST", capsPath,
308 delegate(string request, string path, string param, 308 delegate(string request, string path, string param,
309 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 309 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
310 { 310 {
311 return ViewerStatsReport(request, path, param, 311 return ViewerStatsReport(request, path, param,
312 agentID, caps); 312 agentID, caps);
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
index 8014fb5..0cfe5b1 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Asset
57 } 57 }
58 58
59 public override byte[] Handle(string path, Stream request, 59 public override byte[] Handle(string path, Stream request,
60 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62 bool result = false; 62 bool result = false;
63 63
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
index 43c1693..8f7412b 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Asset
55 } 55 }
56 56
57 public override byte[] Handle(string path, Stream request, 57 public override byte[] Handle(string path, Stream request,
58 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 byte[] result = new byte[0]; 60 byte[] result = new byte[0];
61 61
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
index 1fcd3ed..87b3d2d 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Asset
55 } 55 }
56 56
57 public override byte[] Handle(string path, Stream request, 57 public override byte[] Handle(string path, Stream request,
58 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 60 XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
61 AssetBase asset = (AssetBase) xs.Deserialize(request); 61 AssetBase asset = (AssetBase) xs.Deserialize(request);
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
index 4d1b0ff..a19b599 100644
--- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Server.Handlers.Authentication
71 } 71 }
72 72
73 public override byte[] Handle(string path, Stream request, 73 public override byte[] Handle(string path, Stream request,
74 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 74 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
75 { 75 {
76 string[] p = SplitParams(path); 76 string[] p = SplitParams(path);
77 77
diff --git a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
index e73961b..440b898 100644
--- a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs
@@ -219,7 +219,7 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>.
219 /// Handles all GET and POST requests for OpenID identifier pages and endpoint 219 /// Handles all GET and POST requests for OpenID identifier pages and endpoint
220 /// server communication 220 /// server communication
221 /// </summary> 221 /// </summary>
222 public void Handle(string path, Stream request, Stream response, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 222 public void Handle(string path, Stream request, Stream response, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
223 { 223 {
224 Uri providerEndpoint = new Uri(String.Format("{0}://{1}{2}", httpRequest.Url.Scheme, httpRequest.Url.Authority, httpRequest.Url.AbsolutePath)); 224 Uri providerEndpoint = new Uri(String.Format("{0}://{1}{2}", httpRequest.Url.Scheme, httpRequest.Url.Authority, httpRequest.Url.AbsolutePath));
225 225
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
index d656238..bcf9d47 100644
--- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Server.Handlers.Authorization
55 } 55 }
56 56
57 public override byte[] Handle(string path, Stream request, 57 public override byte[] Handle(string path, Stream request,
58 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest)); 60 XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest));
61 AuthorizationRequest Authorization = (AuthorizationRequest) xs.Deserialize(request); 61 AuthorizationRequest Authorization = (AuthorizationRequest) xs.Deserialize(request);
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
index 49c2e43..3ee405c 100644
--- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Avatar
57 } 57 }
58 58
59 public override byte[] Handle(string path, Stream requestData, 59 public override byte[] Handle(string path, Stream requestData,
60 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62 StreamReader sr = new StreamReader(requestData); 62 StreamReader sr = new StreamReader(requestData);
63 string body = sr.ReadToEnd(); 63 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Base/Utils.cs b/OpenSim/Server/Handlers/Base/Utils.cs
index 92372a0..48d923f 100644
--- a/OpenSim/Server/Handlers/Base/Utils.cs
+++ b/OpenSim/Server/Handlers/Base/Utils.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Server.Handlers.Base
70 } 70 }
71 } 71 }
72 72
73 public static bool GetAuthentication(OSHttpRequest httpRequest, out string authority, out string authKey) 73 public static bool GetAuthentication(IOSHttpRequest httpRequest, out string authority, out string authKey)
74 { 74 {
75 authority = string.Empty; 75 authority = string.Empty;
76 authKey = string.Empty; 76 authKey = string.Empty;
diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs
index fc97d8c..59420f5 100644
--- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Friends
58 } 58 }
59 59
60 public override byte[] Handle(string path, Stream requestData, 60 public override byte[] Handle(string path, Stream requestData,
61 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 61 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
62 { 62 {
63 StreamReader sr = new StreamReader(requestData); 63 StreamReader sr = new StreamReader(requestData);
64 string body = sr.ReadToEnd(); 64 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
index afe2f27..645a77f 100644
--- a/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
+++ b/OpenSim/Server/Handlers/Grid/GridInfoHandlers.cs
@@ -129,7 +129,7 @@ namespace OpenSim.Server.Handlers.Grid
129 } 129 }
130 130
131 public string RestGetGridInfoMethod(string request, string path, string param, 131 public string RestGetGridInfoMethod(string request, string path, string param,
132 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 132 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
133 { 133 {
134 StringBuilder sb = new StringBuilder(); 134 StringBuilder sb = new StringBuilder();
135 135
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
index edc0561..bebf482 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Grid
58 } 58 }
59 59
60 public override byte[] Handle(string path, Stream requestData, 60 public override byte[] Handle(string path, Stream requestData,
61 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 61 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
62 { 62 {
63 StreamReader sr = new StreamReader(requestData); 63 StreamReader sr = new StreamReader(requestData);
64 string body = sr.ReadToEnd(); 64 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
index 485bc3e..4c0d52e 100644
--- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.GridUser
57 } 57 }
58 58
59 public override byte[] Handle(string path, Stream requestData, 59 public override byte[] Handle(string path, Stream requestData,
60 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62 StreamReader sr = new StreamReader(requestData); 62 StreamReader sr = new StreamReader(requestData);
63 string body = sr.ReadToEnd(); 63 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
index 56f130e..661507e 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
61 } 61 }
62 62
63 public override byte[] Handle(string path, Stream requestData, 63 public override byte[] Handle(string path, Stream requestData,
64 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 64 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
65 { 65 {
66 StreamReader sr = new StreamReader(requestData); 66 StreamReader sr = new StreamReader(requestData);
67 string body = sr.ReadToEnd(); 67 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs
index 4accea1..f306b1c 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs
@@ -63,12 +63,12 @@ namespace OpenSim.Server.Handlers.Hypergrid
63 } 63 }
64 64
65 public override byte[] Handle(string path, Stream requestData, 65 public override byte[] Handle(string path, Stream requestData,
66 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 66 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
67 { 67 {
68 return OKResponse(httpResponse); 68 return OKResponse(httpResponse);
69 } 69 }
70 70
71 private byte[] OKResponse(OSHttpResponse httpResponse) 71 private byte[] OKResponse(IOSHttpResponse httpResponse)
72 { 72 {
73 m_log.Debug("[HELO]: hi, GET was called"); 73 m_log.Debug("[HELO]: hi, GET was called");
74 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); 74 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType);
@@ -92,12 +92,12 @@ namespace OpenSim.Server.Handlers.Hypergrid
92 } 92 }
93 93
94 public override byte[] Handle(string path, Stream requestData, 94 public override byte[] Handle(string path, Stream requestData,
95 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 95 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
96 { 96 {
97 return OKResponse(httpResponse); 97 return OKResponse(httpResponse);
98 } 98 }
99 99
100 private byte[] OKResponse(OSHttpResponse httpResponse) 100 private byte[] OKResponse(IOSHttpResponse httpResponse)
101 { 101 {
102 m_log.Debug("[HELO]: hi, HEAD was called"); 102 m_log.Debug("[HELO]: hi, HEAD was called");
103 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType); 103 httpResponse.AddHeader("X-Handlers-Provided", m_HandlersType);
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs
index 850bf14..231e32f 100644
--- a/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs
+++ b/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Inventory
57 } 57 }
58 58
59 public override byte[] Handle(string path, Stream request, 59 public override byte[] Handle(string path, Stream request,
60 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62 XmlSerializer xs = new XmlSerializer(typeof (List<InventoryItemBase>)); 62 XmlSerializer xs = new XmlSerializer(typeof (List<InventoryItemBase>));
63 List<InventoryItemBase> items = (List<InventoryItemBase>)xs.Deserialize(request); 63 List<InventoryItemBase> items = (List<InventoryItemBase>)xs.Deserialize(request);
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 899f9c0..9d6f964 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Server.Handlers.Asset
88 } 88 }
89 89
90 public override byte[] Handle(string path, Stream requestData, 90 public override byte[] Handle(string path, Stream requestData,
91 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 91 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
92 { 92 {
93 StreamReader sr = new StreamReader(requestData); 93 StreamReader sr = new StreamReader(requestData);
94 string body = sr.ReadToEnd(); 94 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
index 8291107..75dd711 100644
--- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Server.Handlers.MapImage
77 m_MapService = service; 77 m_MapService = service;
78 } 78 }
79 79
80 public override byte[] Handle(string path, Stream requestData, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 80 public override byte[] Handle(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
81 { 81 {
82// m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path); 82// m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path);
83 StreamReader sr = new StreamReader(requestData); 83 StreamReader sr = new StreamReader(requestData);
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
index 501074d..fb85d1c 100644
--- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Server.Handlers.MapImage
80 m_MapService = service; 80 m_MapService = service;
81 } 81 }
82 82
83 public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) 83 public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
84 { 84 {
85 byte[] result = new byte[0]; 85 byte[] result = new byte[0];
86 86
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
index 68bb01e..8a1f824 100644
--- a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
+++ b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Server.Handlers.Neighbour
59 } 59 }
60 60
61 public override byte[] Handle(string path, Stream request, 61 public override byte[] Handle(string path, Stream request,
62 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 62 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
63 { 63 {
64 // Not implemented yet 64 // Not implemented yet
65 Console.WriteLine("--- Get region --- " + path); 65 Console.WriteLine("--- Get region --- " + path);
@@ -84,7 +84,7 @@ namespace OpenSim.Server.Handlers.Neighbour
84 } 84 }
85 85
86 public override byte[] Handle(string path, Stream request, 86 public override byte[] Handle(string path, Stream request,
87 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 87 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
88 { 88 {
89 byte[] result = new byte[0]; 89 byte[] result = new byte[0];
90 90
@@ -177,7 +177,7 @@ namespace OpenSim.Server.Handlers.Neighbour
177 } 177 }
178 178
179 public override byte[] Handle(string path, Stream request, 179 public override byte[] Handle(string path, Stream request,
180 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 180 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
181 { 181 {
182 // Not implemented yet 182 // Not implemented yet
183 httpResponse.StatusCode = (int)HttpStatusCode.NotImplemented; 183 httpResponse.StatusCode = (int)HttpStatusCode.NotImplemented;
@@ -198,7 +198,7 @@ namespace OpenSim.Server.Handlers.Neighbour
198 } 198 }
199 199
200 public override byte[] Handle(string path, Stream request, 200 public override byte[] Handle(string path, Stream request,
201 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 201 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
202 { 202 {
203 // Not implemented yet 203 // Not implemented yet
204 httpResponse.StatusCode = (int)HttpStatusCode.NotImplemented; 204 httpResponse.StatusCode = (int)HttpStatusCode.NotImplemented;
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
index 85bf96e..6b6a552 100644
--- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Presence
57 } 57 }
58 58
59 public override byte[] Handle(string path, Stream requestData, 59 public override byte[] Handle(string path, Stream requestData,
60 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 60 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
61 { 61 {
62 StreamReader sr = new StreamReader(requestData); 62 StreamReader sr = new StreamReader(requestData);
63 string body = sr.ReadToEnd(); 63 string body = sr.ReadToEnd();
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 78b09cd..ded335d5 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -272,7 +272,7 @@ namespace OpenSim.Server.Handlers.Simulation
272 } 272 }
273 273
274 public override byte[] Handle(string path, Stream request, 274 public override byte[] Handle(string path, Stream request,
275 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 275 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
276 { 276 {
277// m_log.DebugFormat("[SIMULATION]: Stream handler called"); 277// m_log.DebugFormat("[SIMULATION]: Stream handler called");
278 278
@@ -459,7 +459,7 @@ namespace OpenSim.Server.Handlers.Simulation
459 } 459 }
460 460
461 public override byte[] Handle(string path, Stream request, 461 public override byte[] Handle(string path, Stream request,
462 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 462 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
463 { 463 {
464// m_log.DebugFormat("[SIMULATION]: Stream handler called"); 464// m_log.DebugFormat("[SIMULATION]: Stream handler called");
465 465
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index 5ab4caf..ab383ef 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
69 } 69 }
70 70
71 public override byte[] Handle(string path, Stream requestData, 71 public override byte[] Handle(string path, Stream requestData,
72 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 72 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
73 { 73 {
74 StreamReader sr = new StreamReader(requestData); 74 StreamReader sr = new StreamReader(requestData);
75 string body = sr.ReadToEnd(); 75 string body = sr.ReadToEnd();
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
index 581985a..e10fe82 100644
--- a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -27,25 +27,107 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO;
30using System.Text; 31using System.Text;
32using System.Web;
31using OpenSim.Framework.Servers.HttpServer; 33using OpenSim.Framework.Servers.HttpServer;
32 34
33namespace OpenSim.Tests.Common.Mock 35namespace OpenSim.Tests.Common.Mock
34{ 36{
35 public class TestOSHttpResponse : OSHttpResponse 37 public class TestOSHttpResponse : IOSHttpResponse
36 { 38 {
37 private int m_statusCode; 39 /// <summary>
38 public override int StatusCode 40 /// Content type property.
39 { 41 /// </summary>
40 get { return m_statusCode; } 42 /// <remarks>
41 set { m_statusCode = value; } 43 /// Setting this property will also set IsContentTypeSet to
42 } 44 /// true.
43 45 /// </remarks>
44 private string m_contentType; 46 public string ContentType { get; set; }
45 public override string ContentType 47
46 { 48 /// <summary>
47 get { return m_contentType; } 49 /// Boolean property indicating whether the content type
48 set { m_contentType = value; } 50 /// property actively has been set.
49 } 51 /// </summary>
52 /// <remarks>
53 /// IsContentTypeSet will go away together with .NET base.
54 /// </remarks>
55 // public bool IsContentTypeSet
56 // {
57 // get { return _contentTypeSet; }
58 // }
59 // private bool _contentTypeSet;
60
61 /// <summary>
62 /// Length of the body content; 0 if there is no body.
63 /// </summary>
64 public long ContentLength { get; set; }
65
66 /// <summary>
67 /// Alias for ContentLength.
68 /// </summary>
69 public long ContentLength64 { get; set; }
70
71 /// <summary>
72 /// Encoding of the body content.
73 /// </summary>
74 public Encoding ContentEncoding { get; set; }
75
76 public bool KeepAlive { get; set; }
77
78 /// <summary>
79 /// Get or set the keep alive timeout property (default is
80 /// 20). Setting this to 0 also disables KeepAlive. Setting
81 /// this to something else but 0 also enable KeepAlive.
82 /// </summary>
83 public int KeepAliveTimeout { get; set; }
84
85 /// <summary>
86 /// Return the output stream feeding the body.
87 /// </summary>
88 /// <remarks>
89 /// On its way out...
90 /// </remarks>
91 public Stream OutputStream { get; private set; }
92
93 public string ProtocolVersion { get; set; }
94
95 /// <summary>
96 /// Return the output stream feeding the body.
97 /// </summary>
98 public Stream Body { get; private set; }
99
100 /// <summary>
101 /// Set a redirct location.
102 /// </summary>
103 public string RedirectLocation { private get; set; }
104
105 /// <summary>
106 /// Chunk transfers.
107 /// </summary>
108 public bool SendChunked { get; set; }
109
110 /// <summary>
111 /// HTTP status code.
112 /// </summary>
113 public int StatusCode { get; set; }
114
115 /// <summary>
116 /// HTTP status description.
117 /// </summary>
118 public string StatusDescription { get; set; }
119
120 public bool ReuseContext { get; set; }
121
122 /// <summary>
123 /// Add a header field and content to the response.
124 /// </summary>
125 /// <param name="key">string containing the header field
126 /// name</param>
127 /// <param name="value">string containing the header field
128 /// value</param>
129 public void AddHeader(string key, string value) { throw new NotImplementedException(); }
130
131 public void Send() { }
50 } 132 }
51} 133} \ No newline at end of file