diff --git a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php index 6126cd0..0b9bbad 100644 --- a/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php @@ -61,8 +61,7 @@ public function onRespond(FilterResponseEvent $event) { // since the page is in fact being regenerated right now. // @todo Remove this and use a more intelligent default so that HTTP // caching can function properly. - // @todo use $response->setLastModified() - $response->headers->set('Last-Modified', gmdate(DATE_RFC1123, REQUEST_TIME)); + $response->setLastModified(new \DateTime(gmdate(DATE_RFC1123, REQUEST_TIME))); // Also give each page a unique ETag. This will force clients to include // both an If-Modified-Since header and an If-None-Match header when doing