aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/RestSessionService.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs3
3 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
index 6c8d7cf..a459f1b 100644
--- a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs
@@ -82,7 +82,6 @@ namespace OpenSim.Framework.Servers.HttpServer
82 serializer.Serialize(writer, obj); 82 serializer.Serialize(writer, obj);
83 writer.Flush(); 83 writer.Flush();
84 } 84 }
85 buffer.Close();
86 85
87 int length = (int) buffer.Length; 86 int length = (int) buffer.Length;
88 request.ContentLength = length; 87 request.ContentLength = length;
@@ -109,13 +108,16 @@ namespace OpenSim.Framework.Servers.HttpServer
109 } 108 }
110 finally 109 finally
111 { 110 {
111 buffer.Close();
112 respStream.Close(); 112 respStream.Close();
113 response.Close(); 113 response.Close();
114 } 114 }
115 115
116 action(deserial); 116 action(deserial);
117
117 }, null); 118 }, null);
118 }, null); 119 }, null);
120
119 121
120 return; 122 return;
121 } 123 }
diff --git a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
index 6c0aa46..7ebb462 100644
--- a/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
+++ b/OpenSim/Framework/Servers/HttpServer/RestSessionService.cs
@@ -88,14 +88,15 @@ namespace OpenSim.Framework.Servers.HttpServer
88 serializer.Serialize(writer, sobj); 88 serializer.Serialize(writer, sobj);
89 writer.Flush(); 89 writer.Flush();
90 } 90 }
91 buffer.Close();
92 91
93 int length = (int)buffer.Length; 92 int length = (int)buffer.Length;
94 request.ContentLength = length; 93 request.ContentLength = length;
95 94
96 Stream requestStream = request.GetRequestStream(); 95 Stream requestStream = request.GetRequestStream();
97 requestStream.Write(buffer.ToArray(), 0, length); 96 requestStream.Write(buffer.ToArray(), 0, length);
97 buffer.Close();
98 requestStream.Close(); 98 requestStream.Close();
99
99 TResponse deserial = default(TResponse); 100 TResponse deserial = default(TResponse);
100 using (WebResponse resp = request.GetResponse()) 101 using (WebResponse resp = request.GetResponse())
101 { 102 {
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
index e76d80e..11df103 100644
--- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
@@ -62,7 +62,6 @@ namespace OpenSim.Framework.Servers.HttpServer
62 writer.Write(obj); 62 writer.Write(obj);
63 writer.Flush(); 63 writer.Flush();
64 } 64 }
65 buffer.Close();
66 65
67 length = (int)obj.Length; 66 length = (int)obj.Length;
68 request.ContentLength = length; 67 request.ContentLength = length;
@@ -80,6 +79,8 @@ namespace OpenSim.Framework.Servers.HttpServer
80 { 79 {
81 if (requestStream != null) 80 if (requestStream != null)
82 requestStream.Close(); 81 requestStream.Close();
82 buffer.Close();
83
83 } 84 }
84 } 85 }
85 86