(bug 26) Defer sending cache headers until the skin runs, so that the skin can declar...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 12 Nov 2004 09:34:11 +0000 (09:34 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 12 Nov 2004 09:34:11 +0000 (09:34 +0000)
includes/OutputPage.php

index 9177c31..6403576 100644 (file)
@@ -382,7 +382,9 @@ class OutputPage {
                }
 
 
-               $this->sendCacheControl();
+               # Buffer output; final headers may depend on later processing
+               ob_start();
+
                $this->transformBuffer();
                
                # Disable temporary placeholders, so that the skin produces HTML
@@ -397,7 +399,9 @@ class OutputPage {
                }
 
                $sk->outputPage( $this );
-               # flush();
+               
+               $this->sendCacheControl();
+               ob_end_flush();
        }
 
        function out( $ins ) {