From bb9f9868ebddf9ebf17b9496f2f541dd0b6e7176 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 31 Jan 2003 08:32:41 +0000 Subject: - Committed Alastair Tse's getallheaders() patch. --- includes/common.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 58acf513e..16d1bef5d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -842,8 +842,12 @@ function page_header() { $date = gmdate("D, d M Y H:i:s", $cache->created) ." GMT"; header("Last-Modified: $date"); header("ETag: \"$date\""); - if ($headers = getallheaders()) { - // NOTE: the above is an Apache-ism so for the time being we don't send 304 headers to IIS servers. + if (function_exists("getallheaders") && $headers = getallheaders()) { + /* + ** Notice that the above is an optional Apache-ism so for the + ** time being we don't send 304 headers when "getallheaders()" + ** is not supported (eg. on IIS webservers). + */ if ($headers["If-Modified-Since"] == $date && $headers["If-None-Match"] == "\"$date\"") { header("HTTP/1.0 304 Not Modified"); exit(); -- cgit v1.2.3