avoid a data copy

0.9.1.0-post-fixes
UbitUmarov 2018-12-03 10:17:22 +00:00
parent 57bd671e00
commit 79234795fd
3 changed files with 43 additions and 1 deletions

View File

@ -195,6 +195,42 @@ namespace OpenSim.Framework.Servers.HttpServer
} }
} }
public byte[] RawBuffer
{
get
{
return _httpResponse.RawBuffer;
}
set
{
_httpResponse.RawBuffer = value;
}
}
public int RawBufferStart
{
get
{
return _httpResponse.RawBufferStart;
}
set
{
_httpResponse.RawBufferStart = value;
}
}
public int RawBufferLen
{
get
{
return _httpResponse.RawBufferLen;
}
set
{
_httpResponse.RawBufferLen = value;
}
}
/// <summary> /// <summary>
/// Set a redirct location. /// Set a redirct location.
/// </summary> /// </summary>

View File

@ -206,11 +206,17 @@ namespace OpenSim.Framework.Servers.HttpServer
try try
{ {
if(rangeLen > 0) if(rangeLen > 0)
response.OutputStream.Write(buffer, rangeStart, rangeLen); {
response.RawBufferStart = rangeStart;
response.RawBufferLen = rangeLen;
response.RawBuffer = buffer;
//response.OutputStream.Write(buffer, rangeStart, rangeLen);
}
buffer = null; buffer = null;
response.Send(); response.Send();
response.RawBuffer = null;
} }
catch (Exception ex) catch (Exception ex)
{ {

Binary file not shown.