OK so it looks like all is fine with the server. A test PHP page I made sends 304s fine.
It appears that there is a bug in rss.php, on line 49:
Code: Select all
$modified_since = !empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])
? gmdate('D, d M Y H:i:s \G\M\T', serendipity_serverOffsetHour(strtotime(stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE'])), true))
: false;
Since strtotime will parse the timezone specifier in the HTTP_IF_MODIFIED attribute (e.g. "GMT", "-0400", etc.) there is no need to call serendipity_serverOffsetHour on it. So that line should be:
Code: Select all
? gmdate('D, d M Y H:i:s \G\M\T', strtotime(stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE'])), true)
Once I change that, it seems to be working as expected now. I suppose the reason it was working for you is because your server offset is zero?
It looks like there are some more problems with s9y's handling of time zones and the time offset setting in the options. I have a server offset specified in the configuration as +3 because the server is (apparently) in Pacific US Time, and I'm in Eastern US timezone. That means the server is GMT-0700, I am GMT-0400. In the RSS feed, the articles' pubDate shows the time in my timezone but it is mislabeled as -0700.
One more thing: it seems that most RSS feeds will send the last 15 or 20 entries even when the MODIFIED_SINCE attribute is sent. Some feed readers will only show the last 1 entry with Serendipity feeds because it "forgets" about the previous entries. I propose line 85 to be changed so that 15 entries are retrieved, ignoring the $modified_since variable:
Code: Select all
$entries = serendipity_fetchEntries(null, true, 15, false, (isset($modified_since) ? $modified_since : false), 'timestamp DESC', '', false, true);
-----
$entries = serendipity_fetchEntries(null, true, 15, false, false, 'timestamp DESC', '', false, true);
What do you think?