aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
diff options
context:
space:
mode:
authorlbsa712009-02-19 19:32:53 +0000
committerlbsa712009-02-19 19:32:53 +0000
commitb99d9bdeb1d5177a3dfff1d402d374fbd079ebaa (patch)
treeaa38818eb01549179f0f90322b8cd5c0a249c5d1 /OpenSim/Framework/Servers/PostAssetStreamHandler.cs
parent* Moved the AssetStreamHandlers to OpenSim.Framework.Servers (diff)
downloadopensim-SC-b99d9bdeb1d5177a3dfff1d402d374fbd079ebaa.zip
opensim-SC-b99d9bdeb1d5177a3dfff1d402d374fbd079ebaa.tar.gz
opensim-SC-b99d9bdeb1d5177a3dfff1d402d374fbd079ebaa.tar.bz2
opensim-SC-b99d9bdeb1d5177a3dfff1d402d374fbd079ebaa.tar.xz
* Reverted the AssetServer fix, apparently something was dependent on IAssetDataPlugin being in OpenSim.Data
Diffstat (limited to 'OpenSim/Framework/Servers/PostAssetStreamHandler.cs')
-rw-r--r--OpenSim/Framework/Servers/PostAssetStreamHandler.cs44
1 files changed, 0 insertions, 44 deletions
diff --git a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
deleted file mode 100644
index a62f2b0..0000000
--- a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
+++ /dev/null
@@ -1,44 +0,0 @@
1using System.IO;
2using System.Reflection;
3using System.Xml.Serialization;
4using log4net;
5using OpenMetaverse;
6using OpenSim.Framework;
7using OpenSim.Framework.Servers;
8
9namespace OpenSim.Framework.Servers
10{
11 public class PostAssetStreamHandler : BaseStreamHandler
12 {
13 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
14
15 // private OpenAsset_Main m_assetManager;
16 private IAssetDataPlugin m_assetProvider;
17
18 public override byte[] Handle(string path, Stream request,
19 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
20 {
21 string param = GetParam(path);
22
23 UUID assetId;
24 if (param.Length > 0)
25 UUID.TryParse(param, out assetId);
26 // byte[] txBuffer = new byte[4096];
27
28 XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
29 AssetBase asset = (AssetBase) xs.Deserialize(request);
30
31 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
32 m_assetProvider.CreateAsset(asset);
33
34 return new byte[] {};
35 }
36
37 public PostAssetStreamHandler(IAssetDataPlugin assetProvider)
38 : base("POST", "/assets")
39 {
40 // m_assetManager = assetManager;
41 m_assetProvider = assetProvider;
42 }
43 }
44} \ No newline at end of file