[wp-trac] [WordPress Trac] #40444: REST API responses are sent with an empty Last-Modified header.

WordPress Trac noreply at wordpress.org
Fri Apr 14 10:03:27 UTC 2017


#40444: REST API responses are sent with an empty Last-Modified header.
--------------------------+-----------------------------
 Reporter:  zinigor       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+-----------------------------
 Earlier the same problem was fixed for places that use `nocache_headers`
 function in #23281, but REST API doesn't seem to use `nocache_headers`.

 Steps to reproduce:
 * Use any plugin that utilizes REST API requests, for example, Jetpack. In
 connected mode Jetpack issues several REST API requests in the dashboard,
 for example.
 * Open the browser console and look at the response headers.
 * Observe the `Last-Modified` header that's either empty or has an epoch
 date depending on the configuration of your server.

 This breaks REST API because browsers start caching responses.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40444>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list