(bug 26) Defer sending cache headers until the skin runs, so that the skin can declar...
[lhc/web/wiklou.git] / 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 ) {