aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs17
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
index 8eebc61..5122a77 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Asset
58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 58 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 { 59 {
60 AssetBase asset; 60 AssetBase asset;
61 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 61 XmlSerializer xs = new XmlSerializer(typeof(AssetBase));
62 62
63 try 63 try
64 { 64 {
@@ -71,18 +71,21 @@ namespace OpenSim.Server.Handlers.Asset
71 } 71 }
72 72
73 string[] p = SplitParams(path); 73 string[] p = SplitParams(path);
74 if (p.Length > 1) 74 if (p.Length > 0)
75 { 75 {
76 bool result = m_AssetService.UpdateContent(p[1], asset.Data); 76 string id = p[0];
77 bool result = m_AssetService.UpdateContent(id, asset.Data);
77 78
78 xs = new XmlSerializer(typeof(bool)); 79 xs = new XmlSerializer(typeof(bool));
79 return ServerUtils.SerializeResult(xs, result); 80 return ServerUtils.SerializeResult(xs, result);
80 } 81 }
82 else
83 {
84 string id = m_AssetService.Store(asset);
81 85
82 string id = m_AssetService.Store(asset); 86 xs = new XmlSerializer(typeof(string));
83 87 return ServerUtils.SerializeResult(xs, id);
84 xs = new XmlSerializer(typeof(string)); 88 }
85 return ServerUtils.SerializeResult(xs, id);
86 } 89 }
87 } 90 }
88} 91}