[wp-trac] [WordPress Trac] #13066: Last-Modified headers for individual comment feeds are incorrect

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 21 07:32:35 UTC 2010


#13066: Last-Modified headers for individual comment feeds are incorrect
--------------------------+-------------------------------------------------
 Reporter:  solarissmoke  |       Owner:              
     Type:  defect (bug)  |      Status:  new         
 Priority:  low           |   Milestone:  3.0         
Component:  Feeds         |     Version:  3.0         
 Severity:  normal        |    Keywords:  dev-feedback
--------------------------+-------------------------------------------------
 The WP::send_headers function currently uses get_lastcommentmodified() to
 set the Last-Modified header for all comment feeds. This is a problem when
 used for individual post comment feeds. The function gets the last
 modified comment across all blog posts. That means that every time a
 comment is posted anywhere, the Last-Modified header for ALL comment feeds
 is refreshed. Issues:

 1. This is technically incorrect, since only the global comment feed and
 one specific post's comment feed have changed with the last comment (not
 all possible comment feeds); and

 2. It means that If-Modified-Since requests for other post comment feeds
 will not receive a 304 response when they should do (since their content
 hasn't changed). On blogs with many posts and many comment feeds, this
 will have a large impact on bandwidth because lots of requests will
 receive 200 responses where 304's would have done, just because a comment
 was posted on some other post.

 If I've understood the flow correctly, $wp_query hasn't been fully set up
 at the time this function is called, so changing this behaviour would
 require some change in the flow of things (e.g., the handling of last
 modified headers for feeds moves into the do_feed() function). But doing
 so would mean that Last-Modified headers are correct/meaningful and that
 many more 304 responses can be served.

 Any thoughts?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13066>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list