move headers_sent initialization up to prevent additional trial to send headers...
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 22 Jan 2008 09:12:52 +0000 (09:12 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Tue, 22 Jan 2008 09:12:52 +0000 (09:12 -0000)
svn path=/trunk/mcs/; revision=93487

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

index 28f2c428644169e0c954af65dcbcc79b5a35d670..5d24f27a79d58b8e0b2867d023fb400a1becb04e 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-22  Konstantin Triger <kostat@mainsoft.com>
+
+       * HttpResponse.cs: move headers_sent initialization up to prevent additional
+               trial to send headers if an exception is thrown.
+
 2008-01-21  Konstantin Triger <kostat@mainsoft.com>
 
        * HttpRequest.cs: Form validation: ensure the collection is accessible after
index b2a01db039e9286c99521890fc0cc44785d8f54c..d45f919bafb0199f9a8e0a9b41ffac3e29288b71 100644 (file)
@@ -700,6 +700,8 @@ namespace System.Web {
                        if (headers_sent)
                                return;
 
+                       headers_sent = true;
+
                        if (cached_response != null)
                                cached_response.SetHeaders (headers);
 
@@ -728,7 +730,6 @@ namespace System.Web {
                                        header.SendContent (WorkerRequest);
                                }
                        }
-                       headers_sent = true;
                }
 
                internal void DoFilter (bool close)