aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2011-05-11 20:44:03 -0700
committerDiva Canto2011-05-11 20:44:03 -0700
commite9e4c009b470056dce05cae386860494b0734678 (patch)
tree9c9ab809e48d1d22a945246b19b58024aabeb970 /OpenSim/Framework
parentAdd a smidgen of method doc about the fact that item links reuse the asset id... (diff)
downloadopensim-SC_OLD-e9e4c009b470056dce05cae386860494b0734678.zip
opensim-SC_OLD-e9e4c009b470056dce05cae386860494b0734678.tar.gz
opensim-SC_OLD-e9e4c009b470056dce05cae386860494b0734678.tar.bz2
opensim-SC_OLD-e9e4c009b470056dce05cae386860494b0734678.tar.xz
This makes compression of fatpacks actually work. Previously they always failed. See comment in WebUtil.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/WebUtil.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 55b38cd..bc2cd01 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -199,14 +199,14 @@ namespace OpenSim.Framework
199 using (GZipStream comp = new GZipStream(ms, CompressionMode.Compress)) 199 using (GZipStream comp = new GZipStream(ms, CompressionMode.Compress))
200 { 200 {
201 comp.Write(buffer, 0, buffer.Length); 201 comp.Write(buffer, 0, buffer.Length);
202 comp.Flush(); 202 // We need to close the gzip stream before we write it anywhere
203 203 // because apparently something important related to gzip compression
204 ms.Seek(0, SeekOrigin.Begin); 204 // gets written on the strteam upon Dispose()
205
206 request.ContentLength = ms.Length; //Count bytes to send
207 using (Stream requestStream = request.GetRequestStream())
208 requestStream.Write(ms.ToArray(), 0, (int)ms.Length);
209 } 205 }
206 byte[] buf = ms.ToArray();
207 request.ContentLength = buf.Length; //Count bytes to send
208 using (Stream requestStream = request.GetRequestStream())
209 requestStream.Write(buf, 0, (int)buf.Length);
210 } 210 }
211 } 211 }
212 else 212 else