diff options
author | UbitUmarov | 2018-12-03 10:39:54 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-03 10:39:54 +0000 |
commit | 66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3 (patch) | |
tree | ca1a83d17d78efba2c16254325ab951fc8d48fa9 /OpenSim/Framework/Servers/HttpServer | |
parent | avoid a data copy (diff) | |
download | opensim-SC-66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3.zip opensim-SC-66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3.tar.gz opensim-SC-66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3.tar.bz2 opensim-SC-66f3c6c73030d4f723ec9a3c36dfd32c52f0c5a3.tar.xz |
avoid a data copy
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 0522814..fe3b8a0 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -843,7 +843,10 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
843 | if (!response.SendChunked && response.ContentLength64 <= 0) | 843 | if (!response.SendChunked && response.ContentLength64 <= 0) |
844 | response.ContentLength64 = buffer.LongLength; | 844 | response.ContentLength64 = buffer.LongLength; |
845 | 845 | ||
846 | response.OutputStream.Write(buffer, 0, buffer.Length); | 846 | //response.OutputStream.Write(buffer, 0, buffer.Length); |
847 | response.RawBufferStart = 0; | ||
848 | response.RawBufferLen = buffer.Length; | ||
849 | response.RawBuffer = buffer; | ||
847 | } | 850 | } |
848 | 851 | ||
849 | // Do not include the time taken to actually send the response to the caller in the measurement | 852 | // Do not include the time taken to actually send the response to the caller in the measurement |
@@ -851,7 +854,9 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
851 | // server | 854 | // server |
852 | requestEndTick = Environment.TickCount; | 855 | requestEndTick = Environment.TickCount; |
853 | 856 | ||
857 | buffer = null; | ||
854 | response.Send(); | 858 | response.Send(); |
859 | response.RawBuffer = null; | ||
855 | } | 860 | } |
856 | catch (SocketException e) | 861 | catch (SocketException e) |
857 | { | 862 | { |