[Mono-bugs] [Bug 79665][Blo] New - System.IO.Compression OutOffMemory exception

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Oct 14 15:02:16 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by esanchezfo at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79665

--- shadow/79665	2006-10-14 15:02:16.000000000 -0400
+++ shadow/79665.tmp.26326	2006-10-14 15:02:16.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 79665
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Suse 10.1
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Blocker
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: esanchezfo at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.IO.Compression OutOffMemory exception
+
+Description of Problem:
+
+When try to compress contents to response stream I get an exception, the
+code is the following:
+
+if (context.Request.Headers ["Accept-encoding"] != null &&
+context.Request.Headers ["Accept-encoding"].Contains ("gzip")) 
+			{
+       			context.Response.Filter = new GZipStream
+(context.Response.Filter, CompressionMode.Compress, true);
+       			context.Response.AppendHeader("Content-encoding", "gzip");
+ 			}
+else if (context.Request.Headers ["Accept-encoding"] != null &&
+context.Request.Headers ["Accept-encoding"].Contains ("deflate")) 
+			{
+				context.Response.Filter = new DeflateStream (context.Response.Filter,
+CompressionMode.Compress, true);
+				context.Response.AppendHeader ("Content-encoding", "deflate");
+			}
+
+This an old problem, I need this functionality in order to decrease the
+size of my response for ajax applications (pass from 30K to 6K) using the
+gzip or deflate tools of System.IO.Compression.
+
+An detailed exmaple in: http://codeproject.com/aspnet/HttpCompressionQnD.asp
+
+Actual Results:
+
+System.OutOfMemoryException: Out of memory.
+  at System.IO.Compression.DeflateStream..ctor (System.IO.Stream
+compressedStream, CompressionMode mode, Boolean leaveOpen, Boolean gzip)
+[0x00000] 
+  at (wrapper remoting-invoke-with-check)
+System.IO.Compression.DeflateStream:.ctor
+(System.IO.Stream,System.IO.Compression.CompressionMode,bool,bool)
+  at System.IO.Compression.GZipStream..ctor (System.IO.Stream
+compressedStream, CompressionMode mode, Boolean leaveOpen) [0x00000] 
+  at (wrapper remoting-invoke-with-check)
+System.IO.Compression.GZipStream:.ctor
+(System.IO.Stream,System.IO.Compression.CompressionMode,bool)
+  at esanchezfo.Tool.Web.Js.JsHandler.ProcessRequest
+(System.Web.HttpContext context) [0x00000] 
+  at System.Web.HttpApplication+<>c__CompilerGenerated3.MoveNext () [0x00000] 
+
+Expected Results:
+The compression in the stream.
+
+How often does this happen? All time.
+
+I'm using the lastest mono (13-oct, 1.18) with apache 2 over suse 10.1.
+
+
+Thanks.


More information about the mono-bugs mailing list