aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/WebUtil.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/WebUtil.cs')
-rw-r--r--OpenSim/Framework/WebUtil.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index e614fd5..d683152 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -176,7 +176,8 @@ namespace OpenSim.Framework
176 176
177 public static void LogOutgoingDetail(string context, Stream outputStream) 177 public static void LogOutgoingDetail(string context, Stream outputStream)
178 { 178 {
179 using (StreamReader reader = new StreamReader(Util.Copy(outputStream), Encoding.UTF8)) 179 using (Stream stream = Util.Copy(outputStream))
180 using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
180 { 181 {
181 string output; 182 string output;
182 183
@@ -262,12 +263,12 @@ namespace OpenSim.Framework
262 263
263 using (MemoryStream ms = new MemoryStream()) 264 using (MemoryStream ms = new MemoryStream())
264 { 265 {
265 using (GZipStream comp = new GZipStream(ms, CompressionMode.Compress)) 266 using (GZipStream comp = new GZipStream(ms, CompressionMode.Compress, true))
266 { 267 {
267 comp.Write(buffer, 0, buffer.Length); 268 comp.Write(buffer, 0, buffer.Length);
268 // We need to close the gzip stream before we write it anywhere 269 // We need to close the gzip stream before we write it anywhere
269 // because apparently something important related to gzip compression 270 // because apparently something important related to gzip compression
270 // gets written on the strteam upon Dispose() 271 // gets written on the stream upon Dispose()
271 } 272 }
272 byte[] buf = ms.ToArray(); 273 byte[] buf = ms.ToArray();
273 request.ContentLength = buf.Length; //Count bytes to send 274 request.ContentLength = buf.Length; //Count bytes to send