diff options
author | UbitUmarov | 2017-05-08 00:40:15 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-08 00:40:15 +0100 |
commit | 604b966d8442be6f034d81c8e8d04d12413c357c (patch) | |
tree | cfd3a1ceb083ce7f22ca81d65085f18fe696c443 /OpenSim | |
parent | take more heavy work out of opened dbconn sections (diff) | |
download | opensim-SC_OLD-604b966d8442be6f034d81c8e8d04d12413c357c.zip opensim-SC_OLD-604b966d8442be6f034d81c8e8d04d12413c357c.tar.gz opensim-SC_OLD-604b966d8442be6f034d81c8e8d04d12413c357c.tar.bz2 opensim-SC_OLD-604b966d8442be6f034d81c8e8d04d12413c357c.tar.xz |
some conditional dispose on http requests inputstream
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index c32ee28..92be3a3 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -686,7 +686,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
686 | } | 686 | } |
687 | } | 687 | } |
688 | 688 | ||
689 | request.InputStream.Dispose(); | 689 | if(request.InputStream.CanRead) |
690 | request.InputStream.Dispose(); | ||
690 | 691 | ||
691 | if (buffer != null) | 692 | if (buffer != null) |
692 | { | 693 | { |
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index 0e4a941..fefcb20 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs | |||
@@ -82,6 +82,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
82 | 82 | ||
83 | byte[] buffer = server.DoHTTPGruntWork(responsedata, response); | 83 | byte[] buffer = server.DoHTTPGruntWork(responsedata, response); |
84 | 84 | ||
85 | if(Request.Body.CanRead) | ||
86 | Request.Body.Dispose(); | ||
87 | |||
85 | response.SendChunked = false; | 88 | response.SendChunked = false; |
86 | response.ContentLength64 = buffer.Length; | 89 | response.ContentLength64 = buffer.Length; |
87 | response.ContentEncoding = Encoding.UTF8; | 90 | response.ContentEncoding = Encoding.UTF8; |
@@ -107,6 +110,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
107 | OSHttpResponse response | 110 | OSHttpResponse response |
108 | = new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext); | 111 | = new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext); |
109 | 112 | ||
113 | if(Request.Body.CanRead) | ||
114 | Request.Body.Dispose(); | ||
115 | |||
110 | response.SendChunked = false; | 116 | response.SendChunked = false; |
111 | response.ContentLength64 = 0; | 117 | response.ContentLength64 = 0; |
112 | response.ContentEncoding = Encoding.UTF8; | 118 | response.ContentEncoding = Encoding.UTF8; |