Make WordPress Core

Opened 21 months ago

#47968 new defect (bug)

Feed (with comments) Last-Modified header only considers latest comment date

Reported by: xiven Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.2
Component: Feeds Keywords:
Focuses: Cc:


Steps to reproduce:

  1. Create a wordpress blog
  2. Add a post
  3. Add a comment to that post
  4. Wait a while
  5. Add another post
  6. Check the Last-Modified header of the blog's feed

Expected result:
The Last-Modified header should have the date/time of the post added in step 5.

Actual result:
The Last-Modified header has the date/time of the comment added in step 3. This behaviour breaks caching and causes feed readers to believe there is no new content even when there might be new posts.

The fault lies in the send_headers function of class-wp.php. For a feed including comments it should use the newest date from both the get_lastcommentmodified and the get_lastpostmodified functions instead of only using the result from the get_lastcommentmodified function.

Change History (0)

Note: See TracTickets for help on using tickets.