From cded871bbab870e6662de3caf7d4ba3038c96095 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 2 Feb 2004 04:10:46 +0000 Subject: [PATCH] Move sendCacheControl in checkLastMod to only go when we're chickening out on a 304 --- includes/OutputPage.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 331c01a321..6237263086 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -64,8 +64,6 @@ class OutputPage { return; } - $this->sendCacheControl(); - $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix( max( $timestamp, $wgUser->mTouched ) ) ) . " GMT"; @@ -81,7 +79,7 @@ class OutputPage { if( ($ismodsince >= $timestamp ) and $wgUser->validateCache( $ismodsince ) ) { # Make sure you're in a place you can leave when you call us! header( "HTTP/1.0 304 Not Modified" ); - header( "Last-Modified: {$lastmod}" ); + $this->sendCacheControl(); wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false ); $this->disable(); return true; -- 2.20.1