304 Not Modified bug introduced by 
|Reported by:||tellyworth||Owned by:||westi|
 changes the behaviour of mysql2date(), in a way that can cause WP::send_headers() to incorrectly produce a 304 Not Modified response to an unconditional GET for feeds.
When the locale is something other than English, this line of code in send_headers() gets a non-English date:
$wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT';
That causes $wp_modified_timestamp to be false, which in turn causes the conditional block below to be true and return a 304 response instead of a 200.
Net result is broken feeds for non-en users.
Two things should be fixed imho:
- either mysql2date() returns to its previous behaviour, or send_headers() is changed to use a different function to format $wp_last_modified. I'm not sure that mysql2date is appropriate in this context, when an English-only GMT date is required.
- the conditional block at the bottom of send_headers() should include a defensive check so that a 304 response is never produced unless either IF_MODIFIED_SINCE or IF_NONE_MATCH are set.
Change History (4)
- Component changed from General to Feeds
- Owner changed from anonymous to westi
- Status changed from new to assigned