diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs index f67f8b1038..69f91e414f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs @@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory /// public delegate void RestMethodHandler(RequestData rdata); - public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response); + public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response, string path); /// /// This interface represents the boundary between the general purpose diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index a40d197078..9e4fae6a84 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs @@ -102,9 +102,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory #region Interface - private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) + private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix) { - return (RequestData) new AssetRequestData(request, response, qPrefix); + return (RequestData) new AssetRequestData(request, response, prefix); } // Asset Handler diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs index cb8084659d..61cf0e43f2 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs @@ -56,16 +56,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory public class RestHandler : RestPlugin, IRestHandler, IHttpAgentHandler { - /// - /// The handler delegates are not noteworthy. The allocator allows - /// a given handler to optionally subclass the base RequestData - /// structure to carry any locally required per-request state - /// needed. - /// - - // internal delegate void RestMethodHandler(RequestData rdata); - // internal delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response); - // Handler tables: both stream and REST are supported. The path handlers and their // respective allocators are stored in separate tables. @@ -623,7 +613,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (!String.IsNullOrEmpty(bestMatch)) { - rdata = pathAllocators[bestMatch](request, response); + rdata = pathAllocators[bestMatch](request, response, bestMatch); Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, bestMatch); diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index 6a0fdf2ee1..1ea598ee9a 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -128,9 +128,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory /// REST service domain prefix /// A RequestData instance suitable for this service - private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) + private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix) { - return (RequestData) new InventoryRequestData(request, response, qPrefix); + return (RequestData) new InventoryRequestData(request, response, prefix); } /// @@ -2168,7 +2168,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory } break; default : - Rest.Log.DebugFormat("{0} Type was not inferred", MsgId); + Rest.Log.DebugFormat("{0} Asset/Inventory type could not be inferred for {1}", + MsgId,ic.Item.Name); break; } } @@ -2177,7 +2178,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory /// If this is a TGA remember the fact if (ic.Item.AssetType == (int) AssetType.TextureTGA || - ic.Item.AssetType == (int) AssetType.ImageTGA) + ic.Item.AssetType == (int) AssetType.ImageTGA) { Bitmap temp; Stream tgadata = new MemoryStream(ic.Asset.Data); diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs index 984f6d3c88..3ac48c9b03 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs @@ -110,9 +110,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory #region Interface - private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) + private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix) { - return new RequestData(request, response, qPrefix); + return new RequestData(request, response, prefix); } // Inventory Handler