From ff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 26 Mar 2007 19:05:50 +0000 Subject: preparing to add full clothes/body part support. Currently you can: now create new body parts and clothes. edit those clothes and wear them. But currently you will not see most of the edited effects on your own avatar, although often other clients will see those changes on your avatar. --- OpenSim.RegionServer/CAPS/SimHttp.cs | 143 ++++++++++++++++++----------------- 1 file changed, 74 insertions(+), 69 deletions(-) (limited to 'OpenSim.RegionServer/CAPS/SimHttp.cs') diff --git a/OpenSim.RegionServer/CAPS/SimHttp.cs b/OpenSim.RegionServer/CAPS/SimHttp.cs index 77c6bb8..c3f4801 100644 --- a/OpenSim.RegionServer/CAPS/SimHttp.cs +++ b/OpenSim.RegionServer/CAPS/SimHttp.cs @@ -119,84 +119,89 @@ namespace OpenSim.CAPS private string ParseREST(string requestBody, string requestURL, string requestMethod) { string responseString = ""; - switch (requestURL) + try { - case "/Admin/Accounts": - if (requestMethod == "GET") - { - responseString = "
Account management
"; - responseString += "Create New Account
"; - responseString += NewAccountForm; - } - break; - case "/Admin/Clients": - if (requestMethod == "GET") - { - responseString = "Listing connected Clients
" ; - OpenSim.world.Avatar TempAv; - foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys) + switch (requestURL) + { + case "/Admin/Accounts": + if (requestMethod == "GET") { - if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") - { - TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID]; - responseString += ""; - responseString += String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()); - responseString += "
"; - } + responseString = "Account management
"; + responseString += "Create New Account
"; + responseString += NewAccountForm; } - } - break; - case "/Admin/NewAccount": - if (requestMethod == "POST") - { - string[] comp = new string[10]; - string[] passw = new string[3]; - string delimStr = "&"; - char[] delimiter = delimStr.ToCharArray(); - string delimStr2 = "="; - char[] delimiter2 = delimStr2.ToCharArray(); - - //Console.WriteLine(requestBody); - comp = requestBody.Split(delimiter); - passw = comp[3].Split(delimiter2); - if (passw[1] == passWord) + break; + case "/Admin/Clients": + if (requestMethod == "GET") { - responseString = "New Account created
"; + responseString = "Listing connected Clients
"; + OpenSim.world.Avatar TempAv; + foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys) + { + if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") + { + TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID]; + responseString += ""; + responseString += String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString()); + responseString += "
"; + } + } } - else + break; + case "/Admin/NewAccount": + if (requestMethod == "POST") { - responseString = "Admin password is incorrect, please login with the correct password
"; - responseString += "New Account created
"; + } + else + { + responseString = "Admin password is incorrect, please login with the correct password
"; + responseString += "Login Successful
"; + // Console.WriteLine(requestBody); + if (requestBody == passWord) + { + responseString = "Login Successful
"; + } + else + { + responseString = "Password Error
"; + responseString += "Please Login with the correct password
"; + responseString += "PassWord Error
"; - responseString += "Please Login with the correct password
"; - responseString += "