diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index 0fc937f..70957f5 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs | |||
@@ -44,35 +44,31 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
44 | public class RestAssetServices : IRest | 44 | public class RestAssetServices : IRest |
45 | { | 45 | { |
46 | 46 | ||
47 | private string key = "assets"; | ||
48 | private bool enabled = false; | 47 | private bool enabled = false; |
49 | private string qPrefix = "assets"; | 48 | private string qPrefix = "assets"; |
50 | 49 | ||
51 | // A simple constructor is used to handle any once-only | 50 | // A simple constructor is used to handle any once-only |
52 | // initialization of working classes. | 51 | // initialization of working classes. |
53 | 52 | ||
54 | public RestAssetServices(RestHandler p_rest) | 53 | public RestAssetServices() |
55 | { | 54 | { |
56 | 55 | ||
57 | Rest.Log.InfoFormat("{0} Asset services initializing", MsgId); | 56 | Rest.Log.InfoFormat("{0} Asset services initializing", MsgId); |
58 | Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version); | 57 | Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version); |
59 | 58 | ||
60 | // Integrate domain | 59 | // If the handler specifies a relative path for its domain |
60 | // then we must add the standard absolute prefix, e.g. /admin | ||
61 | 61 | ||
62 | if (!qPrefix.StartsWith(Rest.UrlPathSeparator)) | 62 | if (!qPrefix.StartsWith(Rest.UrlPathSeparator)) |
63 | { | 63 | { |
64 | qPrefix = Rest.Prefix + Rest.UrlPathSeparator + qPrefix; | 64 | qPrefix = Rest.Prefix + Rest.UrlPathSeparator + qPrefix; |
65 | } | 65 | } |
66 | 66 | ||
67 | // Authentication domain | 67 | // Register interface using the fully-qualified prefix |
68 | |||
69 | Rest.Domains.Add(key,Rest.Config.GetString("asset-domain",qPrefix)); | ||
70 | |||
71 | // Register interface | ||
72 | 68 | ||
73 | Rest.Plugin.AddPathHandler(DoAsset, qPrefix, Allocate); | 69 | Rest.Plugin.AddPathHandler(DoAsset, qPrefix, Allocate); |
74 | 70 | ||
75 | // Activate | 71 | // Activate if all went OK |
76 | 72 | ||
77 | enabled = true; | 73 | enabled = true; |
78 | 74 | ||