diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-31 08:32:41 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-31 08:32:41 +0000 |
commit | bb9f9868ebddf9ebf17b9496f2f541dd0b6e7176 (patch) | |
tree | 13a75b54db67d951661c0211ead8302bb9f229fa /includes/common.inc | |
parent | 74a3318ca9163f137793fbcc4d174d2873429ac6 (diff) | |
download | brdo-bb9f9868ebddf9ebf17b9496f2f541dd0b6e7176.tar.gz brdo-bb9f9868ebddf9ebf17b9496f2f541dd0b6e7176.tar.bz2 |
- Committed Alastair Tse's getallheaders() patch.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 6 insertions, 2 deletions
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(); |