aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
diff options
context:
space:
mode:
authorDr Scofield2008-07-25 09:56:35 +0000
committerDr Scofield2008-07-25 09:56:35 +0000
commit7025a8040e06250d73c295aa641969d7189474d8 (patch)
tree87515da33453c530bd18b57c81809d25f59afeac /OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
parentAdd casts from integer to float. Fix issue 1822. (diff)
downloadopensim-SC-7025a8040e06250d73c295aa641969d7189474d8.zip
opensim-SC-7025a8040e06250d73c295aa641969d7189474d8.tar.gz
opensim-SC-7025a8040e06250d73c295aa641969d7189474d8.tar.bz2
opensim-SC-7025a8040e06250d73c295aa641969d7189474d8.tar.xz
From: awebb
Further improvements to the REST handlers.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs14
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