aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
diff options
context:
space:
mode:
authorJeff Ames2009-02-21 03:00:17 +0000
committerJeff Ames2009-02-21 03:00:17 +0000
commitb515645151b1e0b5ac93862a41792914cd86ec82 (patch)
tree40e71bd95f60346ee57dc2674eabbe65cbdcc79c /OpenSim/Framework/Servers/PostAssetStreamHandler.cs
parentThank you, robsmart, for a patch that allows the shard to be set. (diff)
downloadopensim-SC-b515645151b1e0b5ac93862a41792914cd86ec82.zip
opensim-SC-b515645151b1e0b5ac93862a41792914cd86ec82.tar.gz
opensim-SC-b515645151b1e0b5ac93862a41792914cd86ec82.tar.bz2
opensim-SC-b515645151b1e0b5ac93862a41792914cd86ec82.tar.xz
Update svn properties.
Diffstat (limited to 'OpenSim/Framework/Servers/PostAssetStreamHandler.cs')
-rw-r--r--OpenSim/Framework/Servers/PostAssetStreamHandler.cs88
1 files changed, 44 insertions, 44 deletions
diff --git a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
index 6e96361..65145cb 100644
--- a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
@@ -1,45 +1,45 @@
1using System.IO; 1using System.IO;
2using System.Reflection; 2using System.Reflection;
3using System.Xml.Serialization; 3using System.Xml.Serialization;
4using log4net; 4using log4net;
5using OpenMetaverse; 5using OpenMetaverse;
6using OpenSim.Data; 6using OpenSim.Data;
7using OpenSim.Framework; 7using OpenSim.Framework;
8using OpenSim.Framework.Servers; 8using OpenSim.Framework.Servers;
9 9
10namespace OpenSim.Framework.Servers 10namespace OpenSim.Framework.Servers
11{ 11{
12 public class PostAssetStreamHandler : BaseStreamHandler 12 public class PostAssetStreamHandler : BaseStreamHandler
13 { 13 {
14 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 14 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
15 15
16 // private OpenAsset_Main m_assetManager; 16 // private OpenAsset_Main m_assetManager;
17 private IAssetDataPlugin m_assetProvider; 17 private IAssetDataPlugin m_assetProvider;
18 18
19 public override byte[] Handle(string path, Stream request, 19 public override byte[] Handle(string path, Stream request,
20 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 20 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
21 { 21 {
22 string param = GetParam(path); 22 string param = GetParam(path);
23 23
24 UUID assetId; 24 UUID assetId;
25 if (param.Length > 0) 25 if (param.Length > 0)
26 UUID.TryParse(param, out assetId); 26 UUID.TryParse(param, out assetId);
27 // byte[] txBuffer = new byte[4096]; 27 // byte[] txBuffer = new byte[4096];
28 28
29 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 29 XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
30 AssetBase asset = (AssetBase) xs.Deserialize(request); 30 AssetBase asset = (AssetBase) xs.Deserialize(request);
31 31
32 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID); 32 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
33 m_assetProvider.CreateAsset(asset); 33 m_assetProvider.CreateAsset(asset);
34 34
35 return new byte[] {}; 35 return new byte[] {};
36 } 36 }
37 37
38 public PostAssetStreamHandler(IAssetDataPlugin assetProvider) 38 public PostAssetStreamHandler(IAssetDataPlugin assetProvider)
39 : base("POST", "/assets") 39 : base("POST", "/assets")
40 { 40 {
41 // m_assetManager = assetManager; 41 // m_assetManager = assetManager;
42 m_assetProvider = assetProvider; 42 m_assetProvider = assetProvider;
43 } 43 }
44 } 44 }
45} \ No newline at end of file 45} \ No newline at end of file