From 12042cdc2b53e581ace6a017d9b17bd763a544b2 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 20 Oct 2008 18:07:06 +0000 Subject: From: Alan Webb cleanups and assorted fixes to REST inventory, asset, and appearance services. --- .../Rest/Inventory/RestAppearanceServices.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 6983154..11cda6e 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -63,6 +63,16 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory Rest.Log.InfoFormat("{0} User appearance services initializing", MsgId); Rest.Log.InfoFormat("{0} Using REST Implementation Version {1}", MsgId, Rest.Version); + // This is better than a null reference. + + if (Rest.AvatarServices == null) + throw new Exception(String.Format("{0} OpenSim inventory services are not available", + MsgId)); + + if (Rest.UserServices == null) + throw new Exception(String.Format("{0} OpenSim user profile services are not available", + MsgId)); + // If a relative path was specified for the handler's domain, // add the standard prefix to make it absolute, e.g. /admin @@ -170,9 +180,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory try { - // digest scheme seems borked: disable it for the time - // being - rdata.scheme = Rest.AS_BASIC; if (!rdata.IsAuthenticated) { rdata.Fail(Rest.HttpStatusCodeNotAuthorized,String.Format("user \"{0}\" could not be authenticated", rdata.userName)); @@ -731,7 +738,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (asset != UUID.Zero) { - rdata.writer.WriteAttributeString("Item",asset.ToString()); + rdata.writer.WriteAttributeString("Asset",asset.ToString()); } rdata.writer.WriteEndElement(); } -- cgit v1.1