diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs index c781cce513..49c2e437e2 100644 --- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs @@ -138,12 +138,9 @@ namespace OpenSim.Server.Handlers.Avatar if (!UUID.TryParse(request["UserID"].ToString(), out user)) return FailureResult(); - if (request.ContainsKey("Avatar") && request["Avatar"] is Dictionary) - { - AvatarData avatar = new AvatarData((Dictionary)request["Avatar"]); - if (m_AvatarService.SetAvatar(user, avatar)) - return SuccessResult(); - } + AvatarData avatar = new AvatarData(request); + if (m_AvatarService.SetAvatar(user, avatar)) + return SuccessResult(); return FailureResult(); } diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs index bd78c1a662..6d9fc602ed 100644 --- a/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/Avatar/AvatarServiceConnector.cs @@ -140,7 +140,12 @@ namespace OpenSim.Services.Connectors sendData["METHOD"] = "setavatar"; sendData["UserID"] = userID.ToString(); - sendData["Avatar"] = avatar.ToKeyValuePairs(); + + Dictionary structData = avatar.ToKeyValuePairs(); + + foreach (KeyValuePair kvp in structData) + sendData[kvp.Key] = kvp.Value.ToString(); + string reqString = ServerUtils.BuildQueryString(sendData); // m_log.DebugFormat("[AVATAR CONNECTOR]: queryString = {0}", reqString);