aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2017-05-08 00:54:17 +0100
committerUbitUmarov2017-05-08 00:54:17 +0100
commit6c79cc652ba481f714ccd728fe1f062fbd69bb83 (patch)
tree7682c9713f73b679d1ca142fe51b3be1594acf75
parentfix merge (diff)
downloadopensim-SC-6c79cc652ba481f714ccd728fe1f062fbd69bb83.zip
opensim-SC-6c79cc652ba481f714ccd728fe1f062fbd69bb83.tar.gz
opensim-SC-6c79cc652ba481f714ccd728fe1f062fbd69bb83.tar.bz2
opensim-SC-6c79cc652ba481f714ccd728fe1f062fbd69bb83.tar.xz
some conditional dispose on http requests inputstream
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs3
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs6
2 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index ec3805f..da2b860 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -815,7 +815,8 @@ namespace OpenSim.Framework.Servers.HttpServer
815 } 815 }
816 } 816 }
817 817
818 request.InputStream.Dispose(); 818 if(request.InputStream.CanRead)
819 request.InputStream.Dispose();
819 820
820 if (buffer != null) 821 if (buffer != null)
821 { 822 {
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
index 6537f64..eb8ca0d 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
@@ -86,6 +86,9 @@ namespace OpenSim.Framework.Servers.HttpServer
86 86
87 byte[] buffer = server.DoHTTPGruntWork(responsedata, response); 87 byte[] buffer = server.DoHTTPGruntWork(responsedata, response);
88 88
89 if(Request.Body.CanRead)
90 Request.Body.Dispose();
91
89 response.SendChunked = false; 92 response.SendChunked = false;
90 response.ContentLength64 = buffer.Length; 93 response.ContentLength64 = buffer.Length;
91 response.ContentEncoding = Encoding.UTF8; 94 response.ContentEncoding = Encoding.UTF8;
@@ -111,6 +114,9 @@ namespace OpenSim.Framework.Servers.HttpServer
111 OSHttpResponse response 114 OSHttpResponse response
112 = new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext); 115 = new OSHttpResponse(new HttpResponse(HttpContext, Request), HttpContext);
113 116
117 if(Request.Body.CanRead)
118 Request.Body.Dispose();
119
114 response.SendChunked = false; 120 response.SendChunked = false;
115 response.ContentLength64 = 0; 121 response.ContentLength64 = 0;
116 response.ContentEncoding = Encoding.UTF8; 122 response.ContentEncoding = Encoding.UTF8;