fixing Rest/Inventory stuff again. changes somehow got lost locally.
parent
61e6d72cbc
commit
2363cd2113
|
@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// </remarks>
|
||||
|
||||
public delegate void RestMethodHandler(RequestData rdata);
|
||||
public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response);
|
||||
public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response, string path);
|
||||
|
||||
/// <summary>
|
||||
/// This interface represents the boundary between the general purpose
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -56,16 +56,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
public class RestHandler : RestPlugin, IRestHandler, IHttpAgentHandler
|
||||
{
|
||||
|
||||
/// <remarks>
|
||||
/// 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.
|
||||
/// </remarks>
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
@ -128,9 +128,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// <param name=qPrefix>REST service domain prefix</param>
|
||||
/// <returns>A RequestData instance suitable for this service</returns>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue