aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer
diff options
context:
space:
mode:
authorUbitUmarov2018-12-03 10:17:22 +0000
committerUbitUmarov2018-12-03 10:17:22 +0000
commit79234795fd28c413f4a7d973a64a16ac7d6bd939 (patch)
treec9c1f71842ebcfadda5e861a1fc29eeb4fbc97b2 /OpenSim/Framework/Servers/HttpServer
parentstats heap allocation rate can negative (diff)
downloadopensim-SC-79234795fd28c413f4a7d973a64a16ac7d6bd939.zip
opensim-SC-79234795fd28c413f4a7d973a64a16ac7d6bd939.tar.gz
opensim-SC-79234795fd28c413f4a7d973a64a16ac7d6bd939.tar.bz2
opensim-SC-79234795fd28c413f4a7d973a64a16ac7d6bd939.tar.xz
avoid a data copy
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs36
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs8
2 files changed, 43 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
index b26321b..39d9b13 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpResponse.cs
@@ -195,6 +195,42 @@ namespace OpenSim.Framework.Servers.HttpServer
195 } 195 }
196 } 196 }
197 197
198 public byte[] RawBuffer
199 {
200 get
201 {
202 return _httpResponse.RawBuffer;
203 }
204 set
205 {
206 _httpResponse.RawBuffer = value;
207 }
208 }
209
210 public int RawBufferStart
211 {
212 get
213 {
214 return _httpResponse.RawBufferStart;
215 }
216 set
217 {
218 _httpResponse.RawBufferStart = value;
219 }
220 }
221
222 public int RawBufferLen
223 {
224 get
225 {
226 return _httpResponse.RawBufferLen;
227 }
228 set
229 {
230 _httpResponse.RawBufferLen = value;
231 }
232 }
233
198 /// <summary> 234 /// <summary>
199 /// Set a redirct location. 235 /// Set a redirct location.
200 /// </summary> 236 /// </summary>
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
index 66fd2c6..47a0b9c 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs
@@ -206,11 +206,17 @@ namespace OpenSim.Framework.Servers.HttpServer
206 try 206 try
207 { 207 {
208 if(rangeLen > 0) 208 if(rangeLen > 0)
209 response.OutputStream.Write(buffer, rangeStart, rangeLen); 209 {
210 response.RawBufferStart = rangeStart;
211 response.RawBufferLen = rangeLen;
212 response.RawBuffer = buffer;
213 //response.OutputStream.Write(buffer, rangeStart, rangeLen);
214 }
210 215
211 buffer = null; 216 buffer = null;
212 217
213 response.Send(); 218 response.Send();
219 response.RawBuffer = null;
214 } 220 }
215 catch (Exception ex) 221 catch (Exception ex)
216 { 222 {