Commit bb9f9868 authored by Dries's avatar Dries

- Committed Alastair Tse's getallheaders() patch.

parent 74a3318c
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment