2004-10-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 1 Oct 2004 03:36:52 +0000 (03:36 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 1 Oct 2004 03:36:52 +0000 (03:36 -0000)
* HttpResponse.cs: SuppressContent does not throw and clears all the
buffered output. Fixes bug #67213.

svn path=/trunk/mcs/; revision=34583

mcs/class/System.Web/System.Web/ChangeLog
mcs/class/System.Web/System.Web/HttpResponse.cs

index 17b218f78a4ebb76e11caf880d676319c865ed9a..c875f1d485e331989441075306793096fa0e8907 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * HttpResponse.cs: SuppressContent does not throw and clears all the
+       buffered output. Fixes bug #67213.
+
 2004-09-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * HttpUtility.cs: UrlPathEncode is static. Fixes bug #67155.
index 45128ce44150e5c065d6f25c59baff9531fa27a4..73267e6d9d6e8d1440af9528c7046a1e572380e9 100644 (file)
@@ -618,9 +618,6 @@ namespace System.Web
                        }
                        
                        set {
-                               if (_bHeadersSent)
-                                       throw new HttpException ("Headers has been sent to the client");
-
                                _bSuppressContent = true;
                        }
                }
@@ -846,6 +843,9 @@ namespace System.Web
                                if (!_bSuppressContent && Request.HttpMethod == "HEAD")
                                        _bSuppressContent = true;
 
+                               if (_bSuppressContent)
+                                       _Writer.Clear ();
+
                                if (!_bSuppressContent) {
                                        _bClientDisconnected = false;
                                        if (_bChunked) {