summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc8
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();