aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/GetAssetStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestSessionService.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs2
-rw-r--r--OpenSim/Framework/Servers/PostAssetStreamHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs2
5 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
index bc046cf..c6958de 100644
--- a/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/GetAssetStreamHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers
57 57
58 protected override AssetBase GetAsset(UUID assetID) 58 protected override AssetBase GetAsset(UUID assetID)
59 { 59 {
60 return m_assetProvider.FetchAsset(assetID); 60 return m_assetProvider.GetAsset(assetID);
61 } 61 }
62 } 62 }
63} 63}
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index ec2f9ec..2ef4a36 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -75,6 +75,7 @@ namespace OpenSim.Framework.Servers.HttpServer
75 WebRequest request = WebRequest.Create(requestUrl); 75 WebRequest request = WebRequest.Create(requestUrl);
76 request.Method = verb; 76 request.Method = verb;
77 request.ContentType = "text/xml"; 77 request.ContentType = "text/xml";
78 request.Timeout = 20000;
78 79
79 MemoryStream buffer = new MemoryStream(); 80 MemoryStream buffer = new MemoryStream();
80 81
@@ -98,7 +99,9 @@ namespace OpenSim.Framework.Servers.HttpServer
98 { 99 {
99 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse)); 100 XmlSerializer deserializer = new XmlSerializer(typeof(TResponse));
100 deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream()); 101 deserial = (TResponse)deserializer.Deserialize(resp.GetResponseStream());
102 resp.Close();
101 } 103 }
104 requestStream.Close();
102 return deserial; 105 return deserial;
103 } 106 }
104 } 107 }
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs
index 09ef95b..ec9bd4f 100644
--- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestObjectRequester.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Framework.Servers.HttpServer
62 WebRequest request = WebRequest.Create(requestUrl); 62 WebRequest request = WebRequest.Create(requestUrl);
63 request.Method = verb; 63 request.Method = verb;
64 64
65 if (verb == "POST") 65 if ((verb == "POST") || (verb == "PUT"))
66 { 66 {
67 request.ContentType = "text/xml"; 67 request.ContentType = "text/xml";
68 68
diff --git a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
index 419b408..8bf406c 100644
--- a/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
+++ b/OpenSim/Framework/Servers/PostAssetStreamHandler.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Framework.Servers
57 AssetBase asset = (AssetBase) xs.Deserialize(request); 57 AssetBase asset = (AssetBase) xs.Deserialize(request);
58 58
59 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID); 59 m_log.InfoFormat("[REST]: Creating asset {0}", asset.FullID);
60 m_assetProvider.CreateAsset(asset); 60 m_assetProvider.StoreAsset(asset);
61 61
62 return new byte[] {}; 62 return new byte[] {};
63 } 63 }
diff --git a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
index 35da73f..be3f518 100644
--- a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
+++ b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
@@ -128,7 +128,7 @@ namespace OpenSim.Framework.Servers.Tests
128 IAssetDataPlugin assetDataPlugin = new TestAssetDataPlugin(); 128 IAssetDataPlugin assetDataPlugin = new TestAssetDataPlugin();
129 handler = new GetAssetStreamHandler(assetDataPlugin); 129 handler = new GetAssetStreamHandler(assetDataPlugin);
130 130
131 assetDataPlugin.CreateAsset(asset); 131 assetDataPlugin.StoreAsset(asset);
132 return asset; 132 return asset;
133 } 133 }
134 } 134 }