aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2005-09-03 14:55:52 +0000
committerWojciech Polak <polak@gnu.org>2005-09-03 14:55:52 +0000
commit72e4849b567d0bb8a6f7de672f9d24face993391 (patch)
tree5d8829ded93782b3b7714aae8b6614fae24e3121
parentd4bb1aa0f57e06cb9c4deff64c2708a2a8695573 (diff)
downloadblogright-72e4849b567d0bb8a6f7de672f9d24face993391.tar.gz
blogright-72e4849b567d0bb8a6f7de672f9d24face993391.tar.bz2
version 1.9b
-rw-r--r--blog.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/blog.php b/blog.php
index e591dc9..17e2fb5 100644
--- a/blog.php
+++ b/blog.php
@@ -1,6 +1,6 @@
<?php
-// blogRight! version 1.9 (2005-07-30)
+// blogRight! version 1.9b (2005-09-03)
// Copyright (C) 2004, 2005 Wojciech Polak.
//
// This program is free software; you can redistribute it and/or modify
@@ -194,8 +194,23 @@ $year_array = array (); // Array of years for copyright purposes
if (isset ($RSS) || isset ($_REQUEST['rss']))
{
$pubDate = date ("D, d M Y H:i:s O", filemtime ($include_files[0]));
+ $lastModified = gmdate ("D, d M Y H:i:s T", filemtime ($include_files[0]));
+ $ETag = '"'.md5 ($lastModified).'"';
+ $headers = getallheaders ();
+ if (array_key_exists ('If-Modified-Since', $headers) &&
+ array_key_exists ('If-None-Match', $headers))
+ {
+ if ($headers['If-Modified-Since'] == $lastModified &&
+ $headers['If-None-Match'] == $ETag)
+ {
+ header ('HTTP/1.1 304 Not Modified');
+ exit ();
+ }
+ }
header ("Content-Type: text/xml; charset=$charsetEncoding");
+ header ("Last-Modified: $lastModified");
+ header ("ETag: $ETag");
echo '<?xml version="1.0" encoding="'.$charsetEncoding.'"?>'."\n";
echo '<rss version="2.0">'."\n";

Return to:

Send suggestions and report system problems to the System administrator.