avoid a data copy
parent
57bd671e00
commit
79234795fd
|
@ -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>
|
||||
/// Set a redirct location.
|
||||
/// </summary>
|
||||
|
|
|
@ -206,11 +206,17 @@ namespace OpenSim.Framework.Servers.HttpServer
|
|||
try
|
||||
{
|
||||
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;
|
||||
|
||||
response.Send();
|
||||
response.RawBuffer = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue